core

package
v0.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func GetCurrentSchema(ctx *sql.Context) string

GetCurrentSchema returns the current schema used by the context. Defaults to "public" if the context does not specify a schema.

func Init

func Init()

Init initializes this package.

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

func (root *RootValue) DebugString(ctx context.Context, transitive bool) string

DebugString implements the interface doltdb.RootValue.

func (*RootValue) GetCollation added in v0.7.5

func (root *RootValue) GetCollation(ctx context.Context) (schema.Collation, error)

GetCollation implements the interface doltdb.RootValue.

func (*RootValue) GetDatabaseSchemas added in v0.7.5

func (root *RootValue) GetDatabaseSchemas(ctx context.Context) ([]schema.DatabaseSchema, error)

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

func (root *RootValue) GetSequences(ctx context.Context) (*sequences.Collection, error)

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

func (root *RootValue) GetTableHash(ctx context.Context, tName string) (hash.Hash, bool, error)

GetTableHash implements the interface doltdb.RootValue.

func (*RootValue) GetTableNames added in v0.7.5

func (root *RootValue) GetTableNames(ctx context.Context, schemaName string) ([]string, error)

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) HasTable added in v0.7.5

func (root *RootValue) HasTable(ctx context.Context, tName string) (bool, error)

HasTable implements the interface doltdb.RootValue.

func (*RootValue) HashOf added in v0.7.5

func (root *RootValue) HashOf() (hash.Hash, error)

HashOf 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) NodeStore added in v0.7.5

func (root *RootValue) NodeStore() tree.NodeStore

NodeStore implements the interface doltdb.RootValue.

func (*RootValue) NomsValue added in v0.7.5

func (root *RootValue) NomsValue() types.Value

NomsValue 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

func (root *RootValue) ResolveRootValue(ctx context.Context) (doltdb.RootValue, error)

ResolveRootValue implements the interface doltdb.RootValue.

func (*RootValue) ResolveTableName added in v0.7.5

func (root *RootValue) ResolveTableName(ctx context.Context, tName string) (string, bool, error)

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

func (root *RootValue) SetFeatureVersion(v doltdb.FeatureVersion) (doltdb.RootValue, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL