Documentation
¶
Index ¶
- Variables
- func GetCurrentSchema(ctx *sql.Context) string
- func Init()
- func UseRootInSession(ctx *sql.Context, ...) error
- type RootValue
- func (root *RootValue) CreateDatabaseSchema(ctx context.Context, dbSchema schema.DatabaseSchema) (doltdb.RootValue, error)
- func (root *RootValue) DebugString(ctx context.Context, transitive bool) string
- func (root *RootValue) GetCollation(ctx context.Context) (schema.Collation, error)
- func (root *RootValue) GetDatabaseSchemas(ctx context.Context) ([]schema.DatabaseSchema, error)
- func (root *RootValue) GetFeatureVersion(ctx context.Context) (ver doltdb.FeatureVersion, ok bool, err error)
- func (root *RootValue) GetForeignKeyCollection(ctx context.Context) (*doltdb.ForeignKeyCollection, error)
- func (root *RootValue) GetSequences(ctx context.Context) (*sequences.Collection, error)
- func (root *RootValue) GetTable(ctx context.Context, tName doltdb.TableName) (*doltdb.Table, bool, error)
- func (root *RootValue) GetTableHash(ctx context.Context, tName string) (hash.Hash, bool, error)
- func (root *RootValue) GetTableNames(ctx context.Context, schemaName string) ([]string, error)
- func (root *RootValue) HandlePostMerge(ctx context.Context, ourRoot, theirRoot, ancRoot doltdb.RootValue) (doltdb.RootValue, error)
- func (root *RootValue) HasTable(ctx context.Context, tName string) (bool, error)
- func (root *RootValue) HashOf() (hash.Hash, error)
- func (root *RootValue) IterTables(ctx context.Context, ...) error
- func (root *RootValue) NodeStore() tree.NodeStore
- func (root *RootValue) NomsValue() types.Value
- func (root *RootValue) PutForeignKeyCollection(ctx context.Context, fkc *doltdb.ForeignKeyCollection) (doltdb.RootValue, error)
- func (root *RootValue) PutSequences(ctx context.Context, seq *sequences.Collection) (*RootValue, error)
- func (root *RootValue) PutTable(ctx context.Context, tName doltdb.TableName, table *doltdb.Table) (doltdb.RootValue, error)
- func (root *RootValue) RemoveTables(ctx context.Context, skipFKHandling bool, allowDroppingFKReferenced bool, ...) (doltdb.RootValue, error)
- func (root *RootValue) RenameTable(ctx context.Context, oldName, newName string) (doltdb.RootValue, error)
- func (root *RootValue) ResolveRootValue(ctx context.Context) (doltdb.RootValue, error)
- func (root *RootValue) ResolveTableName(ctx context.Context, tName string) (string, bool, error)
- func (root *RootValue) SetCollation(ctx context.Context, collation schema.Collation) (doltdb.RootValue, error)
- func (root *RootValue) SetFeatureVersion(v doltdb.FeatureVersion) (doltdb.RootValue, error)
- func (root *RootValue) SetTableHash(ctx context.Context, tName string, h hash.Hash) (doltdb.RootValue, error)
- func (root *RootValue) VRW() types.ValueReadWriter
Constants ¶
This section is empty.
Variables ¶
var DoltgresFeatureVersion = doltdb.DoltFeatureVersion + 0
DoltgresFeatureVersion is Doltgres' feature version. We use Dolt's feature version added to our own.
Functions ¶
func GetCurrentSchema ¶ added in v0.7.5
GetCurrentSchema returns the current schema used by the context. Defaults to "public" if the context does not specify a schema.
func UseRootInSession ¶ added in v0.7.5
func UseRootInSession(ctx *sql.Context, f func(ctx *sql.Context, root *RootValue) (*RootValue, error)) error
UseRootInSession is a helper for modifying the RootValue from within functions, procedures, etc. If a new RootValue is returned, then it is written to the session. If a RootValue is not returned, then the session is not updated. A new RootValue should only be returned for changes to elements on the RootValue.
Types ¶
type RootValue ¶ added in v0.7.5
type RootValue struct {
// contains filtered or unexported fields
}
RootValue is Doltgres' implementation of doltdb.RootValue.
func (*RootValue) CreateDatabaseSchema ¶ added in v0.7.5
func (root *RootValue) CreateDatabaseSchema(ctx context.Context, dbSchema schema.DatabaseSchema) (doltdb.RootValue, error)
CreateDatabaseSchema implements the interface doltdb.RootValue.
func (*RootValue) DebugString ¶ added in v0.7.5
DebugString implements the interface doltdb.RootValue.
func (*RootValue) GetCollation ¶ added in v0.7.5
GetCollation implements the interface doltdb.RootValue.
func (*RootValue) GetDatabaseSchemas ¶ added in v0.7.5
GetDatabaseSchemas implements the interface doltdb.RootValue.
func (*RootValue) GetFeatureVersion ¶ added in v0.7.5
func (root *RootValue) GetFeatureVersion(ctx context.Context) (ver doltdb.FeatureVersion, ok bool, err error)
GetFeatureVersion implements the interface doltdb.RootValue.
func (*RootValue) GetForeignKeyCollection ¶ added in v0.7.5
func (root *RootValue) GetForeignKeyCollection(ctx context.Context) (*doltdb.ForeignKeyCollection, error)
GetForeignKeyCollection implements the interface doltdb.RootValue.
func (*RootValue) GetSequences ¶ added in v0.7.5
GetSequences returns all sequences that are on the root.
func (*RootValue) GetTable ¶ added in v0.7.5
func (root *RootValue) GetTable(ctx context.Context, tName doltdb.TableName) (*doltdb.Table, bool, error)
GetTable implements the interface doltdb.RootValue.
func (*RootValue) GetTableHash ¶ added in v0.7.5
GetTableHash implements the interface doltdb.RootValue.
func (*RootValue) GetTableNames ¶ added in v0.7.5
GetTableNames implements the interface doltdb.RootValue.
func (*RootValue) HandlePostMerge ¶ added in v0.7.5
func (root *RootValue) HandlePostMerge(ctx context.Context, ourRoot, theirRoot, ancRoot doltdb.RootValue) (doltdb.RootValue, error)
HandlePostMerge implements the interface doltdb.RootValue.
func (*RootValue) IterTables ¶ added in v0.7.5
func (root *RootValue) IterTables(ctx context.Context, cb func(name string, table *doltdb.Table, sch schema.Schema) (stop bool, err error)) error
IterTables implements the interface doltdb.RootValue.
func (*RootValue) PutForeignKeyCollection ¶ added in v0.7.5
func (root *RootValue) PutForeignKeyCollection(ctx context.Context, fkc *doltdb.ForeignKeyCollection) (doltdb.RootValue, error)
PutForeignKeyCollection implements the interface doltdb.RootValue.
func (*RootValue) PutSequences ¶ added in v0.7.5
func (root *RootValue) PutSequences(ctx context.Context, seq *sequences.Collection) (*RootValue, error)
PutSequences writes the given sequences to the returned root value.
func (*RootValue) PutTable ¶ added in v0.7.5
func (root *RootValue) PutTable(ctx context.Context, tName doltdb.TableName, table *doltdb.Table) (doltdb.RootValue, error)
PutTable implements the interface doltdb.RootValue.
func (*RootValue) RemoveTables ¶ added in v0.7.5
func (root *RootValue) RemoveTables(ctx context.Context, skipFKHandling bool, allowDroppingFKReferenced bool, tables ...string) (doltdb.RootValue, error)
RemoveTables implements the interface doltdb.RootValue.
func (*RootValue) RenameTable ¶ added in v0.7.5
func (root *RootValue) RenameTable(ctx context.Context, oldName, newName string) (doltdb.RootValue, error)
RenameTable implements the interface doltdb.RootValue.
func (*RootValue) ResolveRootValue ¶ added in v0.7.5
ResolveRootValue implements the interface doltdb.RootValue.
func (*RootValue) ResolveTableName ¶ added in v0.7.5
ResolveTableName implements the interface doltdb.RootValue.
func (*RootValue) SetCollation ¶ added in v0.7.5
func (root *RootValue) SetCollation(ctx context.Context, collation schema.Collation) (doltdb.RootValue, error)
SetCollation implements the interface doltdb.RootValue.
func (*RootValue) SetFeatureVersion ¶ added in v0.7.5
SetFeatureVersion implements the interface doltdb.RootValue.
func (*RootValue) SetTableHash ¶ added in v0.7.5
func (root *RootValue) SetTableHash(ctx context.Context, tName string, h hash.Hash) (doltdb.RootValue, error)
SetTableHash implements the interface doltdb.RootValue.
func (*RootValue) VRW ¶ added in v0.7.5
func (root *RootValue) VRW() types.ValueReadWriter
VRW implements the interface doltdb.RootValue.