Documentation ¶
Index ¶
- Constants
- func NewSqliteEntityStorage[T any, K storage.Key](getConnection func() *sqlx.DB, schema ITableSchema, ownerValue interface{}) (sto storage.IEntityStorage[T, K], err error)
- func NewSqliteLinkStorage[T any, KS storage.Key, KO storage.Key](getConnection func() *sqlx.DB, schema ITableSchema, ownerValue interface{}) (sto storage.ILinkStorage[T, KS, KO], err error)
- func NewSqliteRecordStorage[T any](getConnection func() *sqlx.DB, schema ITableSchema, ownerValue interface{}) (rto storage.IRecordStorage[T], err error)
- func VerifyDatabase(connection *sqlx.DB, tables []ITableSchema, applyChanges bool) (result []string, err error)
- type IColumnSchema
- type ISqliteStorage
- type ITableSchema
- type SqlDataType
Constants ¶
View Source
const ( SqlDataType_Integer = iota + 1 SqlDataType_Numeric SqlDataType_String SqlDataType_Blob )
Variables ¶
This section is empty.
Functions ¶
func NewSqliteEntityStorage ¶
func NewSqliteEntityStorage[T any, K storage.Key]( getConnection func() *sqlx.DB, schema ITableSchema, ownerValue interface{}) (sto storage.IEntityStorage[T, K], err error)
func NewSqliteLinkStorage ¶
func NewSqliteRecordStorage ¶
func NewSqliteRecordStorage[T any]( getConnection func() *sqlx.DB, schema ITableSchema, ownerValue interface{}) (rto storage.IRecordStorage[T], err error)
func VerifyDatabase ¶
Types ¶
type IColumnSchema ¶
type IColumnSchema interface { ColumnName() string ColumnSqlType() SqlDataType }
type ISqliteStorage ¶
type ITableSchema ¶
type ITableSchema interface { TableName() string SetTableName(string) OwnerColumn() IColumnSchema Columns() []IColumnSchema PrimaryKey() []string Indexes() map[string][]string NewEntity() interface{} GetColumnByName(string) IColumnSchema }
func LoadTableSchema ¶
func LoadTableSchema(entityType reflect.Type, primaryKey []string, indexes map[string][]string, ownerColumn string, ownerType SqlDataType) (schema ITableSchema, err error)
type SqlDataType ¶
type SqlDataType uint32
func (SqlDataType) ToSqlType ¶
func (sdt SqlDataType) ToSqlType() string
Click to show internal directories.
Click to hide internal directories.