beegoschema

package
v0.0.0-...-408edfa Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTableName

func GetTableName(model any) string

https://github.com/beego/beego/blob/master/client/orm/internal/models/models_utils.go#L74 Cloned from beego source code since it is not exported.

func SnakeString

func SnakeString(s string) string

https://github.com/beego/beego/blob/master/client/orm/internal/models/models_utils.go#L280 Cloned from beego source code since it is not exported.

Types

type Loader

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

Loader is a Loader for beego schema.

func New

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

New returns a new Loader.

func (*Loader) Load

func (l *Loader) Load() (string, error)

type Option

type Option func(*Loader)

Option configures the Loader.

func WithModelPosition

func WithModelPosition(pos map[any]string) Option

WithModelPosition sets the model position in the output. The position is used to generate the `-- atlas:pos` directive in the output.

Jump to

Keyboard shortcuts

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