Versions in this module Expand all Collapse all v0 v0.7.0 Dec 27, 2024 v0.6.0 Dec 23, 2024 Changes in this version + const RawConjuctionAND + const RawConjuctionOR + const VERSION + type Controller struct + func NewController(dbConn *sql.DB, tblPrefix string, cfg *ControllerConfig) *Controller + func (c *Controller) AddSQLGenerator(obj interface{}, parentObj interface{}, overwrite bool, forceName string, ...) *ErrController + func (c *Controller) GetFieldNameFromDBCol(obj interface{}, dbCol string) (string, *ErrController) + func (c *Controller) GetObjIDInterface(obj interface{}) interface{} + func (c *Controller) GetObjIDValue(obj interface{}) int64 + func (c *Controller) SetObjCreated(obj interface{}, at int64, by int64) + func (c *Controller) SetObjLastModified(obj interface{}, at int64, by int64) + func (c *Controller) StringToFieldValues(obj interface{}, values map[string]interface{}) map[string]interface{} + func (c Controller) CreateTable(obj interface{}) *ErrController + func (c Controller) CreateTables(xobj ...interface{}) *ErrController + func (c Controller) Delete(obj interface{}, options DeleteOptions) *ErrController + func (c Controller) DeleteMultiple(obj interface{}, options DeleteMultipleOptions) *ErrController + func (c Controller) DropTable(obj interface{}) *ErrController + func (c Controller) DropTables(xobj ...interface{}) *ErrController + func (c Controller) Get(newObjFunc func() interface{}, options GetOptions) ([]interface{}, *ErrController) + func (c Controller) GetCount(newObjFunc func() interface{}, options GetCountOptions) (int64, *ErrController) + func (c Controller) GetFiltersInterfaces(mf map[string]interface{}) []interface{} + func (c Controller) GetObjFieldInterfaces(obj interface{}, includeID bool) []interface{} + func (c Controller) Load(obj interface{}, id string, options LoadOptions) *ErrController + func (c Controller) ResetFields(obj interface{}) + func (c Controller) Save(obj interface{}, options SaveOptions) *ErrController + func (c Controller) UpdateMultiple(obj interface{}, values map[string]interface{}, options UpdateMultipleOptions) *ErrController + func (c Controller) Validate(obj interface{}, filters map[string]interface{}) (bool, map[string]int, error) + type ControllerConfig struct + TagName string + type DeleteMultipleOptions struct + CascadeDeleteDepth int + Constructors map[string]func() interface{} + Filters map[string]interface{} + type DeleteOptions struct + Constructors map[string]func() interface{} + type ErrController struct + Err error + Op string + func (e *ErrController) Error() string + func (e *ErrController) Unwrap() error + type ErrValidation struct + Err error + Fields map[string]int + func (e ErrValidation) Error() string + func (e ErrValidation) Unwrap() error + type GetCountOptions struct + Filters map[string]interface{} + type GetOptions struct + Filters map[string]interface{} + Limit int + Offset int + Order []string + RowObjTransformFunc func(interface{}) interface{} + type LoadOptions struct + Unused bool + type SaveOptions struct + ModifiedAt int64 + ModifiedBy int64 + NoInsert bool + type UpdateMultipleOptions struct + CascadeDeleteDepth int + ConvertValuesFromString bool + Filters map[string]interface{}