beeorm

package module
v3.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 30 Imported by: 0

README

BeeORM

Golang ORM designed for optimal performance with MySQL and Redis

codecov MIT license

Official documentation

Documentation

Overview

Package beeorm keeps main code od BeeORM

Index

Constants

View Source
const DefaultPoolCode = "default"

Variables

This section is empty.

Functions

func ConsumeAsyncBuffer added in v3.1.1

func ConsumeAsyncBuffer(orm ORM, errF func(err error)) (stop func())

func ConsumeAsyncFlushEvents

func ConsumeAsyncFlushEvents(orm ORM, block bool) error

func Copy

func Copy[E any](orm ORM, source E) E

func DeleteEntity

func DeleteEntity[E any](orm ORM, source E)

func EditEntity

func EditEntity[E any](orm ORM, source E) E

func EditEntityField added in v3.1.1

func EditEntityField(orm ORM, entity any, field string, value any) error

func GetByID

func GetByID[E any, I ID](orm ORM, id I) (entity *E, found bool)

func GetByUniqueIndex

func GetByUniqueIndex[E any](orm ORM, indexName string, attributes ...any) (entity *E, found bool)

func MustByID added in v3.6.0

func MustByID[E any, I ID](orm ORM, id I) *E

func NewEntity

func NewEntity[E any](orm ORM) *E

func SearchIDs

func SearchIDs[E any](orm ORM, where Where, pager *Pager) []uint64

func SearchIDsWithCount

func SearchIDsWithCount[E any](orm ORM, where Where, pager *Pager) (results []uint64, totalRows int)

func SearchOne

func SearchOne[E any](orm ORM, where Where) (entity *E, found bool)

Types

type Alter

type Alter struct {
	SQL  string
	Safe bool
	Pool string
}

func GetAlters

func GetAlters(orm ORM) (alters []Alter)

func (Alter) Exec

func (a Alter) Exec(orm ORM)

type AsyncFlushEvents

type AsyncFlushEvents interface {
	EntitySchemas() []EntitySchema
	EventsCount() uint64
	ErrorsCount() uint64
	Events(total int) []FlushEvent
	Errors(total int, last bool) []FlushEventWithError
	TrimEvents(total int)
	TrimErrors(total int)
	RedilPool() string
	RedisList() string
}

func ReadAsyncFlushEvents

func ReadAsyncFlushEvents(orm ORM) []AsyncFlushEvents

type BaseWhere added in v3.5.0

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

func NewWhere

func NewWhere(query string, parameters ...any) *BaseWhere

func (*BaseWhere) Append added in v3.5.0

func (w *BaseWhere) Append(query string, parameters ...any)

func (*BaseWhere) GetParameters added in v3.5.0

func (w *BaseWhere) GetParameters() []any

func (*BaseWhere) SetParameter added in v3.5.0

func (w *BaseWhere) SetParameter(index int, param any) *BaseWhere

func (*BaseWhere) SetParameters added in v3.5.0

func (w *BaseWhere) SetParameters(params ...any) *BaseWhere

func (*BaseWhere) String added in v3.5.0

func (w *BaseWhere) String() string

type Bind

type Bind map[string]any

func IsDirty added in v3.2.0

func IsDirty[E any, I ID](orm ORM, id I) (oldValues, newValues Bind, hasChanges bool)

func (Bind) Get

func (b Bind) Get(key string) any

type BindError

type BindError struct {
	Field   string
	Message string
}

func (*BindError) Error

func (b *BindError) Error() string

type ColumnSchemaDefinition

type ColumnSchemaDefinition struct {
	ColumnName string
	Definition string
}

type DB

type DB interface {
	DBBase
	Begin(orm ORM) DBTransaction
}

type DBBase

type DBBase interface {
	GetConfig() MySQLConfig
	GetDBClient() DBClient
	SetMockDBClient(mock DBClient)
	Prepare(orm ORM, query string) (stmt PreparedStmt, close func())
	Exec(orm ORM, query string, args ...any) ExecResult
	QueryRow(orm ORM, query Where, toFill ...any) (found bool)
	Query(orm ORM, query string, args ...any) (rows Rows, close func())
}

type DBClient

type DBClient interface {
	DBClientQuery
}

type DBClientNoTX

type DBClientNoTX interface {
	DBClientQuery
	Begin() (*sql.Tx, error)
}

type DBClientQuery

type DBClientQuery interface {
	Prepare(query string) (*sql.Stmt, error)
	Exec(query string, args ...any) (sql.Result, error)
	ExecContext(context context.Context, query string, args ...any) (sql.Result, error)
	QueryRow(query string, args ...any) *sql.Row
	QueryRowContext(context context.Context, query string, args ...any) *sql.Row
	Query(query string, args ...any) (*sql.Rows, error)
	QueryContext(context context.Context, query string, args ...any) (*sql.Rows, error)
}

type DBTransaction

type DBTransaction interface {
	DBBase
	Commit(orm ORM)
	Rollback(orm ORM)
}

type Engine

type Engine interface {
	NewORM(parent context.Context) ORM
	DB(code string) DB
	LocalCache(code string) LocalCache
	Redis(code string) RedisCache
	Registry() EngineRegistry
	Option(key string) any
}

type EngineRegistry

type EngineRegistry interface {
	EntitySchema(entity any) EntitySchema
	DBPools() map[string]DB
	LocalCachePools() map[string]LocalCache
	RedisPools() map[string]RedisCache
	Entities() []EntitySchema
	Option(key string) any
	Enums() map[string][]string
	// contains filtered or unexported methods
}

type EngineSetter added in v3.1.0

type EngineSetter interface {
	SetOption(key string, value any)
}

type EntityAnonymousIterator added in v3.2.0

type EntityAnonymousIterator interface {
	Next() bool
	ID() uint64
	Index() int
	Len() int
	Entity() any
	Reset()
}

type EntityFlush

type EntityFlush interface {
	ID() uint64
	Schema() *entitySchema
	// contains filtered or unexported methods
}

type EntityFlushedEvent

type EntityFlushedEvent interface {
	FlushType() FlushType
}

type EntityIterator

type EntityIterator[E any] interface {
	Next() bool
	ID() uint64
	Index() int
	Len() int
	Entity() *E
	All() []*E
	Reset()
	LoadReference(columns ...string)
}

func GetAll

func GetAll[E any](orm ORM) EntityIterator[E]

func GetByIDs

func GetByIDs[E any](orm ORM, ids ...uint64) EntityIterator[E]

func GetByIndex added in v3.7.1

func GetByIndex[E any](orm ORM, indexName string, attributes ...any) EntityIterator[E]

func GetByReference

func GetByReference[E any, I ID](orm ORM, referenceName string, id I) EntityIterator[E]
func Search[E any](orm ORM, where Where, pager *Pager) EntityIterator[E]

func SearchWithCount

func SearchWithCount[E any](orm ORM, where Where, pager *Pager) (results EntityIterator[E], totalRows int)

type EntitySchema

type EntitySchema interface {
	EntitySchemaShared
	DropTable(orm ORM)
	TruncateTable(orm ORM)
	UpdateSchema(orm ORM)
	UpdateSchemaAndTruncateTable(orm ORM)
	GetSchemaChanges(orm ORM) (alters []Alter, has bool)
	DisableCache(local, redis bool)
	NewEntity(orm ORM) any
	GetByID(orm ORM, id uint64) (entity any, found bool)
	Search(orm ORM, where Where, pager *Pager) EntityAnonymousIterator
	SearchWithCount(orm ORM, where Where, pager *Pager) (results EntityAnonymousIterator, totalRows int)
	SearchIDs(orm ORM, where Where, pager *Pager) []uint64
	SearchIDsWithCount(orm ORM, where Where, pager *Pager) (results []uint64, totalRows int)
	IsDirty(orm ORM, id uint64) (oldValues, newValues Bind, hasChanges bool)
	Copy(orm ORM, source any) any
	EditEntityField(orm ORM, entity any, field string, value any) error
	EditEntity(orm ORM, entity any) any
	DeleteEntity(orm ORM, entity any)
	// contains filtered or unexported methods
}

func GetEntitySchema

func GetEntitySchema[E any](orm ORM) EntitySchema

type EntitySchemaSetter added in v3.1.0

type EntitySchemaSetter interface {
	SetOption(key string, value any)
	EntitySchemaShared
}

type EntitySchemaShared added in v3.1.0

type EntitySchemaShared interface {
	GetTableName() string
	GetType() reflect.Type
	GetColumns() []string
	GetTag(field, key, trueValue, defaultValue string) string
	Option(key string) any
	GetUniqueIndexes() map[string][]string
	GetDB() DB
	GetLocalCache() (cache LocalCache, has bool)
	GetRedisCache() (cache RedisCache, has bool)
}

type EnumValues

type EnumValues interface {
	EnumValues() any
}

type ExecResult

type ExecResult interface {
	LastInsertId() uint64
	RowsAffected() uint64
}

type FlushEvent

type FlushEvent struct {
	SQL             string
	QueryAttributes []string
}

type FlushEventWithError

type FlushEventWithError struct {
	FlushEvent
	Error string
}

type FlushType

type FlushType int
const (
	Insert FlushType = iota
	Update
	Delete
)

type ID added in v3.7.1

type ID interface {
	int | uint | uint8 | uint16 | uint32 | uint64 | int8 | int16 | int32 | int64
}

type IDGetter added in v3.7.0

type IDGetter interface {
	GetID() uint64
}

type IndexSchemaDefinition

type IndexSchemaDefinition struct {
	Name       string
	Unique     bool
	Duplicated bool
	// contains filtered or unexported fields
}

func (*IndexSchemaDefinition) GetColumns

func (ti *IndexSchemaDefinition) GetColumns() []string

func (*IndexSchemaDefinition) SetColumns

func (ti *IndexSchemaDefinition) SetColumns(columns []string)

type LocalCache

type LocalCache interface {
	Set(orm ORM, key string, value any)
	Remove(orm ORM, key string)
	GetConfig() LocalCacheConfig
	Get(orm ORM, key string) (value any, ok bool)
	Clear(orm ORM)
	GetUsage() []LocalCacheUsage
	// contains filtered or unexported methods
}

type LocalCacheConfig

type LocalCacheConfig interface {
	GetCode() string
	GetLimit() int
	GetSchema() EntitySchema
}

type LocalCacheUsage added in v3.6.1

type LocalCacheUsage struct {
	Type      string
	Limit     uint64
	Used      uint64
	Evictions uint64
}

type Lock

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

func (*Lock) Refresh

func (l *Lock) Refresh(orm ORM, ttl time.Duration) bool

func (*Lock) Release

func (l *Lock) Release(orm ORM)

func (*Lock) TTL

func (l *Lock) TTL(orm ORM) time.Duration

type Locker

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

func (*Locker) Obtain

func (l *Locker) Obtain(orm ORM, key string, ttl time.Duration, waitTimeout time.Duration) (lock *Lock, obtained bool)

type LogEntity

type LogEntity[Entity any] struct {
	ID       uint64 `orm:"split_async_flush=log-entity"`
	EntityID uint64
	Date     time.Time `orm:"time"`
	Meta     []byte
	Before   []byte
	After    []byte
}

type LogHandler

type LogHandler interface {
	Handle(orm ORM, log map[string]any)
}

type Meta

type Meta map[string]string

func (Meta) Get

func (m Meta) Get(key string) string

type MockDBClient

type MockDBClient struct {
	OriginDB            DBClient
	PrepareMock         func(query string) (*sql.Stmt, error)
	ExecMock            func(query string, args ...any) (sql.Result, error)
	ExecContextMock     func(context context.Context, query string, args ...any) (sql.Result, error)
	QueryRowMock        func(query string, args ...any) *sql.Row
	QueryRowContextMock func(context context.Context, query string, args ...any) *sql.Row
	QueryMock           func(query string, args ...any) (*sql.Rows, error)
	QueryContextMock    func(context context.Context, query string, args ...any) (*sql.Rows, error)
	BeginMock           func() (*sql.Tx, error)
	CommitMock          func() error
	RollbackMock        func() error
}

func (*MockDBClient) Exec

func (m *MockDBClient) Exec(query string, args ...any) (sql.Result, error)

func (*MockDBClient) ExecContext

func (m *MockDBClient) ExecContext(context context.Context, query string, args ...any) (sql.Result, error)

func (*MockDBClient) Prepare

func (m *MockDBClient) Prepare(query string) (*sql.Stmt, error)

func (*MockDBClient) Query

func (m *MockDBClient) Query(query string, args ...any) (*sql.Rows, error)

func (*MockDBClient) QueryContext

func (m *MockDBClient) QueryContext(context context.Context, query string, args ...any) (*sql.Rows, error)

func (*MockDBClient) QueryRow

func (m *MockDBClient) QueryRow(query string, args ...any) *sql.Row

func (*MockDBClient) QueryRowContext

func (m *MockDBClient) QueryRowContext(context context.Context, query string, args ...any) *sql.Row

type MockLogHandler

type MockLogHandler struct {
	Logs []map[string]any
}

func (*MockLogHandler) Clear

func (h *MockLogHandler) Clear()

func (*MockLogHandler) Handle

func (h *MockLogHandler) Handle(_ ORM, log map[string]any)

type MySQLConfig

type MySQLConfig interface {
	GetCode() string
	GetDatabaseName() string
	GetDataSourceURI() string
	GetOptions() *MySQLOptions
	// contains filtered or unexported methods
}

type MySQLOptions

type MySQLOptions struct {
	ConnMaxLifetime    time.Duration
	MaxOpenConnections int
	MaxIdleConnections int
	DefaultEncoding    string
	DefaultCollate     string
	IgnoredTables      []string
}

type ORM added in v3.2.0

type ORM interface {
	Context() context.Context
	Clone() ORM
	CloneWithContext(context context.Context) ORM
	Engine() Engine
	Flush() error
	FlushAsync() error
	ClearFlush()
	RedisPipeLine(pool string) *RedisPipeLine
	RegisterQueryLogger(handler LogHandler, mysql, redis, local bool)
	EnableQueryDebug()
	EnableQueryDebugCustom(mysql, redis, local bool)
	SetMetaData(key, value string)
	GetMetaData() Meta
	// contains filtered or unexported methods
}

func PrepareTables

func PrepareTables(t *testing.T, registry Registry, entities ...any) (orm ORM)

type Pager

type Pager struct {
	CurrentPage int
	PageSize    int
}

func NewPager

func NewPager(currentPage, pageSize int) *Pager

func (*Pager) GetCurrentPage

func (pager *Pager) GetCurrentPage() int

func (*Pager) GetPageSize

func (pager *Pager) GetPageSize() int

func (*Pager) IncrementPage

func (pager *Pager) IncrementPage()

func (*Pager) String

func (pager *Pager) String() string

type PipeLineBool

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

func (*PipeLineBool) Result

func (c *PipeLineBool) Result() bool

type PipeLineGet

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

func (*PipeLineGet) Result

func (c *PipeLineGet) Result() (value string, has bool)

type PipeLineInt

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

func (*PipeLineInt) Result

func (c *PipeLineInt) Result() int64

type PipeLineSlice

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

func (*PipeLineSlice) Result

func (c *PipeLineSlice) Result() []string

type PipeLineString

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

func (*PipeLineString) Result

func (c *PipeLineString) Result() string

type PluginInterfaceEntityFlush added in v3.1.0

type PluginInterfaceEntityFlush interface {
	EntityFlush(schema EntitySchema, entity reflect.Value, before, after Bind, engine Engine) (PostFlushAction, error)
}

type PluginInterfaceInitRegistryFromYaml added in v3.1.0

type PluginInterfaceInitRegistryFromYaml interface {
	InitRegistryFromYaml(registry Registry, yaml map[string]any) error
}

type PluginInterfaceValidateEntitySchema added in v3.1.0

type PluginInterfaceValidateEntitySchema interface {
	ValidateEntitySchema(schema EntitySchemaSetter) error
}

type PluginInterfaceValidateRegistry added in v3.1.0

type PluginInterfaceValidateRegistry interface {
	ValidateRegistry(engine EngineSetter, registry Registry) error
}

type PostFlushAction added in v3.1.0

type PostFlushAction func(orm ORM)

type PreparedStmt

type PreparedStmt interface {
	Exec(orm ORM, args ...any) ExecResult
	Query(orm ORM, args ...any) (rows Rows, close func())
	QueryRow(orm ORM, args []any, toFill ...any) (found bool)
	Close() error
}

type QueryLoggerSource

type QueryLoggerSource int

type RedisCache

type RedisCache interface {
	Set(orm ORM, key string, value any, expiration time.Duration)
	MSet(orm ORM, pairs ...any)
	Del(orm ORM, keys ...string)
	HSet(orm ORM, key string, values ...any)
	HDel(orm ORM, key string, keys ...string)
	GetSet(orm ORM, key string, expiration time.Duration, provider func() any) any
	Info(orm ORM, section ...string) string
	GetConfig() RedisPoolConfig
	Get(orm ORM, key string) (value string, has bool)
	Eval(orm ORM, script string, keys []string, args ...any) any
	EvalSha(orm ORM, sha1 string, keys []string, args ...any) (res any, exists bool)
	SetNX(orm ORM, key string, value any, expiration time.Duration) bool
	ScriptExists(orm ORM, sha1 string) bool
	ScriptLoad(orm ORM, script string) string
	LPush(orm ORM, key string, values ...any) int64
	LPop(orm ORM, key string) string
	RPush(orm ORM, key string, values ...any) int64
	LLen(orm ORM, key string) int64
	Exists(orm ORM, keys ...string) int64
	Type(orm ORM, key string) string
	LRange(orm ORM, key string, start, stop int64) []string
	LSet(orm ORM, key string, index int64, value any)
	RPop(orm ORM, key string) (value string, found bool)
	BLMove(orm ORM, source, destination, srcPos, destPos string, timeout time.Duration) string
	LMove(orm ORM, source, destination, srcPos, destPos string) string
	LRem(orm ORM, key string, count int64, value any)
	Ltrim(orm ORM, key string, start, stop int64)
	HSetNx(orm ORM, key, field string, value any) bool
	HMGet(orm ORM, key string, fields ...string) map[string]any
	HGetAll(orm ORM, key string) map[string]string
	HGet(orm ORM, key, field string) (value string, has bool)
	HLen(orm ORM, key string) int64
	HIncrBy(orm ORM, key, field string, incr int64) int64
	IncrBy(orm ORM, key string, incr int64) int64
	Incr(orm ORM, key string) int64
	IncrWithExpire(orm ORM, key string, expire time.Duration) int64
	Expire(orm ORM, key string, expiration time.Duration) bool
	ZAdd(orm ORM, key string, members ...redis.Z) int64
	ZRevRange(orm ORM, key string, start, stop int64) []string
	ZRevRangeWithScores(orm ORM, key string, start, stop int64) []redis.Z
	ZRangeWithScores(orm ORM, key string, start, stop int64) []redis.Z
	ZCard(orm ORM, key string) int64
	ZCount(orm ORM, key string, min, max string) int64
	ZScore(orm ORM, key, member string) float64
	MGet(orm ORM, keys ...string) []any
	SAdd(orm ORM, key string, members ...any) int64
	SMembers(orm ORM, key string) []string
	SIsMember(orm ORM, key string, member any) bool
	SCard(orm ORM, key string) int64
	SPop(orm ORM, key string) (string, bool)
	SPopN(orm ORM, key string, max int64) []string
	XTrim(orm ORM, stream string, maxLen int64) (deleted int64)
	XRange(orm ORM, stream, start, stop string, count int64) []redis.XMessage
	XRevRange(orm ORM, stream, start, stop string, count int64) []redis.XMessage
	XInfoStream(orm ORM, stream string) *redis.XInfoStream
	XInfoGroups(orm ORM, stream string) []redis.XInfoGroup
	XGroupCreate(orm ORM, stream, group, start string) (key string, exists bool)
	XGroupCreateMkStream(orm ORM, stream, group, start string) (key string, exists bool)
	XGroupDestroy(orm ORM, stream, group string) int64
	XRead(orm ORM, a *redis.XReadArgs) []redis.XStream
	XDel(orm ORM, stream string, ids ...string) int64
	XGroupDelConsumer(orm ORM, stream, group, consumer string) int64
	XReadGroup(orm ORM, a *redis.XReadGroupArgs) (streams []redis.XStream)
	XPending(orm ORM, stream, group string) *redis.XPending
	XPendingExt(orm ORM, a *redis.XPendingExtArgs) []redis.XPendingExt
	XLen(orm ORM, stream string) int64
	XClaim(orm ORM, a *redis.XClaimArgs) []redis.XMessage
	XClaimJustID(orm ORM, a *redis.XClaimArgs) []string
	XAck(orm ORM, stream, group string, ids ...string) int64
	FlushAll(orm ORM)
	FlushDB(orm ORM)
	GetLocker() *Locker
	Process(orm ORM, cmd redis.Cmder) error
	GetCode() string
}

type RedisOptions

type RedisOptions struct {
	User            string
	Password        string
	Master          string
	Sentinels       []string
	SentinelOptions *redis.FailoverOptions
}

type RedisPipeLine

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

func (*RedisPipeLine) Del

func (rp *RedisPipeLine) Del(key ...string)

func (*RedisPipeLine) Exec

func (rp *RedisPipeLine) Exec(orm ORM)

func (*RedisPipeLine) Expire

func (rp *RedisPipeLine) Expire(key string, expiration time.Duration) *PipeLineBool

func (*RedisPipeLine) Get

func (rp *RedisPipeLine) Get(key string) *PipeLineGet

func (*RedisPipeLine) HDel

func (rp *RedisPipeLine) HDel(key string, values ...string)

func (*RedisPipeLine) HIncrBy

func (rp *RedisPipeLine) HIncrBy(key, field string, incr int64) *PipeLineInt

func (*RedisPipeLine) HSet

func (rp *RedisPipeLine) HSet(key string, values ...any)

func (*RedisPipeLine) LPush

func (rp *RedisPipeLine) LPush(key string, values ...any)

func (*RedisPipeLine) LRange

func (rp *RedisPipeLine) LRange(key string, start, stop int64) *PipeLineSlice

func (*RedisPipeLine) LSet

func (rp *RedisPipeLine) LSet(key string, index int64, value any)

func (*RedisPipeLine) MSet

func (rp *RedisPipeLine) MSet(pairs ...any)

func (*RedisPipeLine) RPush

func (rp *RedisPipeLine) RPush(key string, values ...any)

func (*RedisPipeLine) SAdd

func (rp *RedisPipeLine) SAdd(key string, members ...any)

func (*RedisPipeLine) SRem

func (rp *RedisPipeLine) SRem(key string, members ...any)

func (*RedisPipeLine) Set

func (rp *RedisPipeLine) Set(key string, value any, expiration time.Duration)

func (*RedisPipeLine) XAdd

func (rp *RedisPipeLine) XAdd(stream string, values []string) *PipeLineString

type RedisPoolConfig

type RedisPoolConfig interface {
	GetCode() string
	GetDatabaseNumber() int
	GetAddress() string
	// contains filtered or unexported methods
}

type Reference

type Reference[E any] uint64

func (Reference[E]) GetEntity

func (r Reference[E]) GetEntity(orm ORM) *E

func (Reference[E]) GetID added in v3.7.0

func (r Reference[E]) GetID() uint64

type Registry

type Registry interface {
	Validate() (Engine, error)
	RegisterEntity(entity ...any)
	RegisterPlugin(plugin ...any)
	RegisterMySQL(dataSourceName string, poolCode string, poolOptions *MySQLOptions)
	RegisterLocalCache(code string, limit int)
	RegisterRedis(address string, db int, poolCode string, options *RedisOptions)
	InitByYaml(yaml map[string]any) error
	SetOption(key string, value any)
}

func NewRegistry

func NewRegistry() Registry

type Rows

type Rows interface {
	Next() bool
	Scan(dest ...any)
	Columns() []string
}

type SQLRow

type SQLRow interface {
	Scan(dest ...any) error
}

type SQLRows

type SQLRows interface {
	Next() bool
	Err() error
	Close() error
	Scan(dest ...any) error
	Columns() ([]string, error)
}

type TXClient

type TXClient interface {
	DBClientQuery
}

type TableSQLSchemaDefinition

type TableSQLSchemaDefinition struct {
	EntitySchema   EntitySchema
	EntityColumns  []*ColumnSchemaDefinition
	EntityIndexes  []*IndexSchemaDefinition
	DBTableColumns []*ColumnSchemaDefinition
	DBIndexes      []*IndexSchemaDefinition
	DBCreateSchema string
	DBEncoding     string
	Engine         string
	PreAlters      []Alter
	PostAlters     []Alter
	// contains filtered or unexported fields
}

func (*TableSQLSchemaDefinition) CreateTableSQL

func (td *TableSQLSchemaDefinition) CreateTableSQL() string

type Where

type Where interface {
	String() string
	GetParameters() []any
}

Directories

Path Synopsis
plugins

Jump to

Keyboard shortcuts

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