Documentation ¶
Index ¶
- Constants
- type Schema
- func (s *Schema) CheckIfEventingIsPossible(dbAlias, col string, obj map[string]interface{}, isFind bool) (findForUpdate map[string]interface{}, present bool)
- func (s *Schema) GetCollectionSchema(ctx context.Context, project, dbType string) (map[string]*config.TableRule, error)
- func (s *Schema) GetSchema(dbType, col string) (SchemaFields, bool)
- func (s *Schema) Inspector(ctx context.Context, dbType, project, col string) (schemaCollection, error)
- func (s *Schema) SchemaCreation(ctx context.Context, dbAlias, tableName, project string, ...) error
- func (s *Schema) SchemaInspection(ctx context.Context, dbAlias, project, col string) (string, error)
- func (s *Schema) SchemaModifyAll(ctx context.Context, dbAlias, project string, ...) error
- func (s *Schema) SetConfig(conf config.Crud, project string) error
- func (s *Schema) ValidateCreateOperation(dbType, col string, req *model.CreateRequest) error
- func (s *Schema) ValidateUpdateOperation(dbType, col, op string, updateDoc, find map[string]interface{}) error
- type SchemaFieldType
- type SchemaFields
- type TableProperties
Constants ¶
View Source
const (
TypeID string = "ID"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schema ¶
type Schema struct { SchemaDoc schemaType // contains filtered or unexported fields }
Schema data stucture for schema package
func (*Schema) CheckIfEventingIsPossible ¶ added in v0.15.3
func (*Schema) GetCollectionSchema ¶
func (s *Schema) GetCollectionSchema(ctx context.Context, project, dbType string) (map[string]*config.TableRule, error)
GetCollectionSchema returns schemas of collection aka tables for specified project & database
func (*Schema) GetSchema ¶ added in v0.14.0
func (s *Schema) GetSchema(dbType, col string) (SchemaFields, bool)
func (*Schema) Inspector ¶
func (s *Schema) Inspector(ctx context.Context, dbType, project, col string) (schemaCollection, error)
Inspector generates schema
func (*Schema) SchemaCreation ¶
func (s *Schema) SchemaCreation(ctx context.Context, dbAlias, tableName, project string, parsedSchema schemaType) error
SchemaCreation creates or alters tables of sql
func (*Schema) SchemaInspection ¶
func (s *Schema) SchemaInspection(ctx context.Context, dbAlias, project, col string) (string, error)
SchemaInspection returns the schema in schema definition language (SDL)
func (*Schema) SchemaModifyAll ¶
func (s *Schema) SchemaModifyAll(ctx context.Context, dbAlias, project string, tables map[string]*config.TableRule) error
SchemaModifyAll modifies all the tables provided
func (*Schema) ValidateCreateOperation ¶
func (s *Schema) ValidateCreateOperation(dbType, col string, req *model.CreateRequest) error
ValidateCreateOperation validates schema on create operation
type SchemaFieldType ¶ added in v0.14.0
type SchemaFieldType struct { FieldName string IsFieldTypeRequired bool IsList bool Kind string // For directives IsPrimary bool IsIndex bool IsUnique bool IsCreatedAt bool IsUpdatedAt bool IsLinked bool IsForeign bool IsDefault bool IndexInfo *TableProperties LinkedTable *TableProperties JointTable *TableProperties Default interface{} // contains filtered or unexported fields }
type SchemaFields ¶ added in v0.14.0
type SchemaFields map[string]*SchemaFieldType // key is field name
Click to show internal directories.
Click to hide internal directories.