Documentation
¶
Index ¶
- type Schema
- type SchemaDB
- func (s *SchemaDB) ActivateSchema(version string) error
- func (s *SchemaDB) Close() error
- func (s *SchemaDB) CreateSchema(schema *Schema) error
- func (s *SchemaDB) GetActiveSchema() (*Schema, error)
- func (s *SchemaDB) GetAllSchemas() ([]*Schema, error)
- func (s *SchemaDB) GetSchemaByVersion(version string) (*Schema, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schema ¶
type Schema struct {
ID string `json:"id" db:"id"`
Version string `json:"version" db:"version"`
SDL string `json:"sdl" db:"sdl"`
Status string `json:"status" db:"status"`
Description string `json:"description" db:"description"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
CreatedBy string `json:"created_by" db:"created_by"`
Checksum string `json:"checksum" db:"checksum"`
IsActive bool `json:"is_active" db:"is_active"`
}
Schema represents a database schema record
type SchemaDB ¶
type SchemaDB struct {
// contains filtered or unexported fields
}
SchemaDB handles database operations for schemas
func NewSchemaDB ¶
NewSchemaDB creates a new schema database connection
func (*SchemaDB) ActivateSchema ¶
ActivateSchema activates a specific schema version
func (*SchemaDB) CreateSchema ¶
CreateSchema creates a new schema in the database
func (*SchemaDB) GetActiveSchema ¶
GetActiveSchema retrieves the currently active schema
func (*SchemaDB) GetAllSchemas ¶
GetAllSchemas retrieves all schemas
Click to show internal directories.
Click to hide internal directories.