Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bulk ¶
type Bulk interface {
BulkInsert(tableName string, records []map[string]interface{}) ([]map[string]interface{}, error)
Upsert(tableName string, data map[string]interface{}, conflictColumns []string, updateColumns []string) (map[string]interface{}, error)
BulkUpdate(tableName string, updates []map[string]interface{}, whereColumn string) (int64, error)
BulkDelete(tableName string, ids []interface{}, idColumn string) (int64, error)
}
type MigrationService ¶
type Performance ¶
type Performance interface {
CreateIndexes(tableName string) error
OptimizeQuery(query string) ([]string, error)
GetPerformanceMetrics() (map[string]interface{}, error)
CreateCustomIndex(tableName, indexName string, columns []string) error
AnalyzeTablePerformance(tableName string) (map[string]interface{}, error)
}
type RelationshipService ¶
type RelationshipService interface {
CreateRelationship(req models.CreateRelationshipRequest) (*models.RelationshipDefinition, error)
DeleteRelationship(relationship *models.RelationshipDefinition, dropConstraints bool, dropJoinTable bool) error
SetRelationshipData(relationship *models.RelationshipDefinition, req models.RelationshipDataRequest) (*models.RelationshipDataResponse, error)
AddRelationshipData(relationship *models.RelationshipDefinition, req models.RelationshipDataRequest) (*models.RelationshipDataResponse, error)
RemoveRelationshipData(relationship *models.RelationshipDefinition, req models.RelationshipDataRequest) (*models.RelationshipDataResponse, error)
}
type Table ¶
type Table interface {
// Schema introspection
GetTables(schema string) ([]models.Table, error)
// Data operations
GetTableData(tableName string, params models.QueryParams) ([]map[string]interface{}, error)
CreateRecord(tableName string, data map[string]interface{}) (map[string]interface{}, error)
UpdateRecord(tableName string, id interface{}, data map[string]interface{}) (map[string]interface{}, error)
DeleteRecord(tableName string, id interface{}) error
// DDL operations
CreateTable(req models.CreateTableRequest) error
AddColumn(tableName string, req models.AddColumnRequest) error
AlterTable(tableName string, req models.AlterTableRequest) error
// Utilities
BuildComplexQuery(tableName string, filters map[string]interface{}) (models.QueryParams, error)
CreateSchema(ctx context.Context, schemaName string) error
DropTable(ctx context.Context, tableName string) error
CreateView(ctx context.Context, viewName string, viewSQL string) error
CreateFunction(ctx context.Context, functionName string, functionSQL string) error
GetByFunction(ctx context.Context, functionName string, args map[string]interface{}) ([]map[string]interface{}, error)
}
Click to show internal directories.
Click to hide internal directories.