Documentation
¶
Index ¶
Constants ¶
View Source
const ( OP_C = "C" OP_R = "R" OP_U = "U" OP_D = "D" OP_AA = "AA" OP_AD = "AD" )
Variables ¶
This section is empty.
Functions ¶
func SetDefaultTenant ¶ added in v0.0.6
func SetDefaultTenant(t string)
Types ¶
type CrudOpts ¶
type CrudOpts struct { Op string `json:"op"` // OP - can be C R U OR D Db string `json:"db"` // REsolved by server, nevermind Tb string `json:"tb"` // Table name Where []interface{} `json:"where"` // Where clause - []interface{}{"id =?" , my_var_id} ID interface{} `json:"id"` // When dealing w ID required ops, this is mandatory (update, delete) Data interface{} `json:"data"` // Object with data to be managed Cols []interface{} `json:"cols"` // Define cols returned by select Associations []string `json:"associations"` // See gorm docs - https://gorm.io/docs/ PageSize int `json:"pagesize"` // Offset for selected records Page int `json:"page"` AssociationTable string `json:"association_table"` AssociationFieldA string `json:"association_field_a"` AssociationFieldB string `json:"association_field_b"` AssociationIDA uint `json:"association_id_a"` AssociationIDB uint `json:"association_id_b"` Debug bool `json:"debug"` AutoPreload bool `json:"auto_preload"` }
type CrudResponse ¶ added in v0.0.5
type CrudResponse struct { Data interface{} `json:"data"` RowsAffected int64 `json:"rowsaffected"` }
Click to show internal directories.
Click to hide internal directories.