Documentation ¶
Index ¶
- func NewEngine(db *sqlx.DB, cfg Config)
- type Condition
- type Config
- type DbProviderI
- type Engine
- type Entity
- func (e *Entity[entityType]) Delete(id int64) error
- func (e *Entity[entityType]) FindAll(p *Pagination) ([]entityType, error)
- func (e *Entity[entityType]) FindBy(filters []F, p *Pagination) ([]entityType, error)
- func (e *Entity[entityType]) FindByID(id int64) (entityType, error)
- func (e *Entity[entityType]) FindOneBy(filters []F, p *Pagination) (entityType, error)
- func (e *Entity[entityType]) Get(where string, args ...interface{}) (entityType, error)
- func (e *Entity[entityType]) Insert(item interface{}) error
- func (e *Entity[entityType]) Inserts(items []entityType) error
- func (e *Entity[entityType]) Select(where string, args ...interface{}) ([]entityType, error)
- func (e *Entity[entityType]) Update(entity entityType) error
- type EntityMetadataInfo
- type F
- type GPAEntity
- type MetaDataList
- func (m MetaDataList) GetDataByDBTag(dbTag string) EntityMetadataInfo
- func (m MetaDataList) GetFieldEntity() []interface{}
- func (m MetaDataList) GetFieldValues() interface{}
- func (m MetaDataList) GetFieldsDb() []string
- func (m MetaDataList) GetFieldsName() []string
- func (m MetaDataList) GetFieldsType() []reflect.Type
- func (m MetaDataList) GetMappedByMetaJoin(tableNameMeta string) string
- type MetaLazyEntity
- type MetaTags
- type Pagination
- type Sign
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DbProviderI ¶ added in v0.0.4
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) GetInstance ¶ added in v0.0.4
func (e *Engine) GetInstance() DbProviderI
func (*Engine) SetTableName ¶
type Entity ¶
type Entity[entityType any] struct { // contains filtered or unexported fields }
func (*Entity[entityType]) FindAll ¶
func (e *Entity[entityType]) FindAll(p *Pagination) ([]entityType, error)
func (*Entity[entityType]) FindBy ¶
func (e *Entity[entityType]) FindBy(filters []F, p *Pagination) ([]entityType, error)
func (*Entity[entityType]) FindOneBy ¶ added in v0.0.4
func (e *Entity[entityType]) FindOneBy(filters []F, p *Pagination) (entityType, error)
type EntityMetadataInfo ¶ added in v0.0.4
type EntityMetadataInfo struct { FieldDb string FieldName string FieldType reflect.Type FieldValue interface{} FieldEntity interface{} MetaTags MetaTags }
EntityMetadataInfo MetaData info structure for saving information about field Contains also nested field FieldEntity, which should be the same EntityMetadataInfo type
type MetaDataList ¶ added in v0.0.4
type MetaDataList []EntityMetadataInfo
func (MetaDataList) GetDataByDBTag ¶ added in v0.0.4
func (m MetaDataList) GetDataByDBTag(dbTag string) EntityMetadataInfo
func (MetaDataList) GetFieldEntity ¶ added in v0.0.4
func (m MetaDataList) GetFieldEntity() []interface{}
func (MetaDataList) GetFieldValues ¶ added in v0.0.4
func (m MetaDataList) GetFieldValues() interface{}
func (MetaDataList) GetFieldsDb ¶ added in v0.0.4
func (m MetaDataList) GetFieldsDb() []string
func (MetaDataList) GetFieldsName ¶ added in v0.0.4
func (m MetaDataList) GetFieldsName() []string
func (MetaDataList) GetFieldsType ¶ added in v0.0.4
func (m MetaDataList) GetFieldsType() []reflect.Type
func (MetaDataList) GetMappedByMetaJoin ¶ added in v0.0.4
func (m MetaDataList) GetMappedByMetaJoin(tableNameMeta string) string
type MetaLazyEntity ¶ added in v0.0.4
type Pagination ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.