Documentation
¶
Index ¶
- type Declaration
- func (d *Declaration) GetColumns() []column.ColumnBasic
- func (d *Declaration) GetField(name string) (Field, bool)
- func (d *Declaration) GetFieldNames() []string
- func (d *Declaration) GetFields() []Field
- func (d *Declaration) GetPKFields() []Field
- func (d *Declaration) GetPreparedColumns() []column.ColumnBasic
- type Field
- type Manager
- type ManagerConfig
- type Model
- type ModelDetails
- type Reflector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Declaration ¶
type Declaration struct { DatabaseName string TableName string Engine string PartitionBy string Settings []string OrderBy []string Fields map[string]Field }
func (*Declaration) GetColumns ¶
func (d *Declaration) GetColumns() []column.ColumnBasic
func (*Declaration) GetFieldNames ¶
func (d *Declaration) GetFieldNames() []string
func (*Declaration) GetFields ¶
func (d *Declaration) GetFields() []Field
func (*Declaration) GetPKFields ¶
func (d *Declaration) GetPKFields() []Field
func (*Declaration) GetPreparedColumns ¶
func (d *Declaration) GetPreparedColumns() []column.ColumnBasic
type Field ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(cfg *ManagerConfig) *Manager
func (*Manager) GetConfig ¶
func (m *Manager) GetConfig() *ManagerConfig
func (*Manager) GetDeclaration ¶
func (m *Manager) GetDeclaration(model any) (*Declaration, error)
func (*Manager) RegisterModel ¶
func (*Manager) SetConfig ¶
func (m *Manager) SetConfig(cfg *ManagerConfig)
type ManagerConfig ¶
type ManagerConfig struct {
DatabaseName string
}
type Model ¶
type Model interface { TableName() string Settings() []string GetDeclaration() *Declaration ScanRow(row chconn.SelectStmt) error }
type ModelDetails ¶
type Reflector ¶
type Reflector struct {
// contains filtered or unexported fields
}
func (*Reflector) ReflectModel ¶
func (r *Reflector) ReflectModel(modelType reflect.Type) (*Declaration, error)
Click to show internal directories.
Click to hide internal directories.