Documentation ¶
Index ¶
- func AdjustWhereClause(ctx context.Context, dbAlias string, dbType model.DBType, col string, ...) error
- func CrudPostProcess(ctx context.Context, dbAlias, dbType, col string, schemaDoc model.Type, ...) error
- func GetConstraintName(tableName, columnName string) string
- func Parser(dbSchemas config.DatabaseSchemas) (model.Type, error)
- func SchemaValidator(ctx context.Context, dbAlias, dbType, col string, ...) (map[string]interface{}, error)
- func ValidateCreateOperation(ctx context.Context, dbAlias, dbType, col string, schemaDoc model.Type, ...) error
- func ValidateUpdateOperation(ctx context.Context, dbAlias, dbType, col, op string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustWhereClause ¶
func AdjustWhereClause(ctx context.Context, dbAlias string, dbType model.DBType, col string, schemaDoc model.Type, find map[string]interface{}) error
AdjustWhereClause adjusts where clause to take care of types
func CrudPostProcess ¶
func CrudPostProcess(ctx context.Context, dbAlias, dbType, col string, schemaDoc model.Type, result interface{}) error
CrudPostProcess unmarshalls the json field in read request
func GetConstraintName ¶
GetConstraintName generates constraint name for joint fields
func Parser ¶
func Parser(dbSchemas config.DatabaseSchemas) (model.Type, error)
Parser function parses the schema im module
func SchemaValidator ¶
func SchemaValidator(ctx context.Context, dbAlias, dbType, col string, collectionFields model.Fields, doc map[string]interface{}) (map[string]interface{}, error)
SchemaValidator validates provided doc object against it's schema
func ValidateCreateOperation ¶
func ValidateCreateOperation(ctx context.Context, dbAlias, dbType, col string, schemaDoc model.Type, req *model.CreateRequest) error
ValidateCreateOperation validates req body against provided schema
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.