Documentation
¶
Overview ¶
Package boltdb contains the boltdb implementation of the Schemar interfaces.
Index ¶
- Variables
- type Schemar
- func (s *Schemar) CreateField(ctx context.Context, qtid dax.QualifiedTableID, fld *dax.Field) error
- func (s *Schemar) CreateTable(ctx context.Context, qtbl *dax.QualifiedTable) error
- func (s *Schemar) DropField(ctx context.Context, qtid dax.QualifiedTableID, fldName dax.FieldName) error
- func (s *Schemar) DropTable(ctx context.Context, qtid dax.QualifiedTableID) error
- func (s *Schemar) Table(ctx context.Context, qtid dax.QualifiedTableID) (*dax.QualifiedTable, error)
- func (s *Schemar) TableID(ctx context.Context, qual dax.TableQualifier, name dax.TableName) (dax.QualifiedTableID, error)
- func (s *Schemar) Tables(ctx context.Context, qual dax.TableQualifier, ids ...dax.TableID) ([]*dax.QualifiedTable, error)
Constants ¶
This section is empty.
Variables ¶
var SchemarBuckets []boltdb.Bucket = []boltdb.Bucket{
bucketSchemar,
}
SchemarBuckets defines the buckets used by this package. It can be called during setup to create the buckets ahead of time.
Functions ¶
This section is empty.
Types ¶
type Schemar ¶
type Schemar struct {
// contains filtered or unexported fields
}
func NewSchemar ¶
NewSchemar returns a new instance of Schemar with default values.
func (*Schemar) CreateField ¶
CreateField creates the field provided in the given table. If a field with the same name already exists then an error is returned.
func (*Schemar) CreateTable ¶
CreateTable creates the table provided. If a table with the same name already exists then an error is returned.
func (*Schemar) DropField ¶
func (s *Schemar) DropField(ctx context.Context, qtid dax.QualifiedTableID, fldName dax.FieldName) error
DropField removes the field from the table.
func (*Schemar) DropTable ¶
DropTable drops the given table. If the named/IDed table does not exist then an error is returned.
func (*Schemar) Table ¶
func (s *Schemar) Table(ctx context.Context, qtid dax.QualifiedTableID) (*dax.QualifiedTable, error)
Table returns the TableInfo for the given table. An error is returned if the table does not exist.