Documentation
¶
Index ¶
- type Schema
- func (s *Schema) GetCollectionSchema(ctx context.Context, project, dbType string) (map[string]*config.TableRule, error)
- func (s *Schema) Inspector(ctx context.Context, dbType, project, col string) (schemaCollection, error)
- func (s *Schema) SchemaCreation(ctx context.Context, dbType, col, project string, parsedSchema schemaType) error
- func (s *Schema) SchemaInspection(ctx context.Context, dbType, project, col string) (string, error)
- func (s *Schema) SchemaModifyAll(ctx context.Context, dbType, 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 string, updateDoc map[string]interface{}) error
Constants ¶
This section is empty.
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) 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) Inspector ¶
func (s *Schema) Inspector(ctx context.Context, dbType, project, col string) (schemaCollection, error)
Inspector does something
func (*Schema) SchemaCreation ¶
func (s *Schema) SchemaCreation(ctx context.Context, dbType, col, project string, parsedSchema schemaType) error
SchemaCreation creates or alters tables of sql
func (*Schema) SchemaInspection ¶
SchemaInspection resturn schema in schema definition language (SDL)
func (*Schema) SchemaModifyAll ¶
func (s *Schema) SchemaModifyAll(ctx context.Context, dbType, 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
Click to show internal directories.
Click to hide internal directories.