gormschema

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

Loader is a Loader for gorm schema.

func New

func New(dialect string, opts ...Option) *Loader

New returns a new Loader.

func (*Loader) Load

func (l *Loader) Load(models ...any) (string, error)

Load loads the models and returns the DDL statements representing the schema.

type Option

type Option func(*Loader)

Option configures the Loader.

func WithConfig

func WithConfig(cfg *gorm.Config) Option

WithConfig sets the gorm config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL