dfunctions

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ConstraintsVerifyFuncName    = "constraints_verify"
	ConstraintsVerifyAllFuncName = "constraints_verify_all"
)
View Source
const ActiveBranchFuncName = "active_branch"
View Source
const CommitFuncName = "commit"
View Source
const DoltAddFuncName = "dolt_add"
View Source
const DoltBackupFuncName = "dolt_backup"
View Source
const DoltBranchFuncName = "dolt_branch"
View Source
const DoltCheckoutFuncName = "dolt_checkout"
View Source
const DoltCleanFuncName = "dolt_clean"
View Source
const DoltCommitFuncName = "dolt_commit"
View Source
const DoltFetchFuncName = "dolt_fetch"
View Source
const DoltMergeBaseFuncName = "dolt_merge_base"
View Source
const DoltMergeFuncName = "dolt_merge"
View Source
const DoltMergeWarningCode int = 1105 // Since this our own custom warning we'll use 1105, the code for an unknown error
View Source
const DoltPullFuncName = "dolt_pull"
View Source
const DoltPushFuncName = "dolt_push"
View Source
const DoltResetFuncName = "dolt_reset"
View Source
const HashOfFuncName = "hashof"
View Source
const MergeFuncName = "merge"
View Source
const (
	RevertFuncName = "dolt_revert"
)
View Source
const VersionFuncName = "dolt_version"

Variables

DolthubApiFunctions are the DoltFunctions that get exposed to Dolthub Api.

View Source
var EmptyBranchNameErr = errors.New("error: cannot branch empty string")
View Source
var ErrEmptyBranchName = errors.New("error: cannot checkout empty string")
View Source
var ErrUncommittedChanges = goerrors.NewKind("cannot merge with uncommitted changes")
View Source
var InvalidArgErr = errors.New("error: invalid usage")
View Source
var VersionString = "SET_BY_INIT"

Functions

func DoDoltAdd

func DoDoltAdd(ctx *sql.Context, args []string) (int, error)

func DoDoltBackup

func DoDoltBackup(ctx *sql.Context, args []string) (int, error)

func DoDoltBranch

func DoDoltBranch(ctx *sql.Context, args []string) (int, error)

func DoDoltCheckout

func DoDoltCheckout(ctx *sql.Context, args []string) (int, error)

func DoDoltClean

func DoDoltClean(ctx *sql.Context, args []string) (int, error)

func DoDoltCommit

func DoDoltCommit(ctx *sql.Context, args []string) (string, error)

func DoDoltConstraintsVerify

func DoDoltConstraintsVerify(ctx *sql.Context, isAll bool, vals []string) (int, error)

func DoDoltFetch

func DoDoltFetch(ctx *sql.Context, args []string) (int, error)

func DoDoltMerge

func DoDoltMerge(ctx *sql.Context, args []string) (int, error)

func DoDoltPull

func DoDoltPull(ctx *sql.Context, args []string) (int, error)

func DoDoltPush

func DoDoltPush(ctx *sql.Context, args []string) (int, error)

func DoDoltReset

func DoDoltReset(ctx *sql.Context, args []string) (int, error)

func DoDoltRevert

func DoDoltRevert(ctx *sql.Context, row sql.Row, args []string) (int, error)

func NewActiveBranchFunc

func NewActiveBranchFunc() sql.Expression

NewActiveBranchFunc creates a new ActiveBranchFunc expression.

func NewCommitFunc

func NewCommitFunc(args ...sql.Expression) (sql.Expression, error)

NewCommitFunc creates a new CommitFunc expression. Deprecated: please use the version in the dprocedures package

func NewConstraintsVerifyAllFunc

func NewConstraintsVerifyAllFunc(args ...sql.Expression) (sql.Expression, error)

NewConstraintsVerifyAllFunc creates a new ConstraintsVerifyFunc expression that verifies all rows. Deprecated: please use the version in the dprocedures package

func NewConstraintsVerifyFunc

func NewConstraintsVerifyFunc(args ...sql.Expression) (sql.Expression, error)

NewConstraintsVerifyFunc creates a new ConstraintsVerifyFunc expression that verifies the diff. Deprecated: please use the version in the dprocedures package

func NewDoltAddFunc

func NewDoltAddFunc(args ...sql.Expression) (sql.Expression, error)

NewDoltAddFunc creates a new DoltAddFunc expression whose children represents the args passed in DOLT_ADD. Deprecated: please use the version in the dprocedures package

func NewDoltBackupFunc deprecated

func NewDoltBackupFunc(args ...sql.Expression) (sql.Expression, error)

Deprecated: please use the version in the dprocedures package

func NewDoltBranchFunc deprecated

func NewDoltBranchFunc(args ...sql.Expression) (sql.Expression, error)

Deprecated: please use the version in the dprocedures package

func NewDoltCheckoutFunc deprecated

func NewDoltCheckoutFunc(args ...sql.Expression) (sql.Expression, error)

Deprecated: please use the version in the dprocedures package

func NewDoltCleanFunc deprecated

func NewDoltCleanFunc(args ...sql.Expression) (sql.Expression, error)

Deprecated: please use the version in the dprocedures package

func NewDoltCommitFunc

func NewDoltCommitFunc(args ...sql.Expression) (sql.Expression, error)

NewDoltCommitFunc creates a new DoltCommitFunc expression whose children represents the args passed in DOLT_COMMIT. Deprecated: please use the version in the dprocedures package

func NewDoltMergeFunc deprecated

func NewDoltMergeFunc(args ...sql.Expression) (sql.Expression, error)

Deprecated: please use the version in the dprocedures package

func NewDoltResetFunc deprecated

func NewDoltResetFunc(args ...sql.Expression) (sql.Expression, error)

Deprecated: please use the version in the dprocedures package

func NewFetchFunc

func NewFetchFunc(args ...sql.Expression) (sql.Expression, error)

NewFetchFunc creates a new FetchFunc expression. Deprecated: please use the version in the dprocedures package

func NewHashOf

func NewHashOf(e sql.Expression) sql.Expression

NewHashOf creates a new HashOf expression.

func NewMergeBase

func NewMergeBase(left, right sql.Expression) sql.Expression

NewMergeBase returns a MergeBase sql function.

func NewMergeFunc

func NewMergeFunc(args ...sql.Expression) (sql.Expression, error)

NewMergeFunc creates a new MergeFunc expression. Deprecated: please use the version in the dprocedures package

func NewPullFunc

func NewPullFunc(args ...sql.Expression) (sql.Expression, error)

NewPullFunc creates a new PullFunc expression. Deprecated: please use the version in the dprocedures package

func NewPushFunc

func NewPushFunc(args ...sql.Expression) (sql.Expression, error)

NewPushFunc creates a new PushFunc expression. Deprecated: please use the version in the dprocedures package

func NewRevertFunc

func NewRevertFunc(args ...sql.Expression) (sql.Expression, error)

NewRevertFunc creates a new RevertFunc expression that reverts commits. Deprecated: please use the version in the dprocedures package

func NewVersion

func NewVersion() sql.Expression

NewVersion creates a new Version expression.

Types

type ActiveBranchFunc

type ActiveBranchFunc struct {
}

func (*ActiveBranchFunc) Children

func (*ActiveBranchFunc) Children() []sql.Expression

Children implements the Expression interface.

func (*ActiveBranchFunc) Eval

func (ab *ActiveBranchFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*ActiveBranchFunc) IsNullable

func (ab *ActiveBranchFunc) IsNullable() bool

IsNullable implements the Expression interface.

func (*ActiveBranchFunc) Resolved

func (*ActiveBranchFunc) Resolved() bool

Resolved implements the Expression interface.

func (*ActiveBranchFunc) String

func (ab *ActiveBranchFunc) String() string

String implements the Stringer interface.

func (*ActiveBranchFunc) Type

func (ab *ActiveBranchFunc) Type() sql.Type

func (*ActiveBranchFunc) WithChildren

func (ab *ActiveBranchFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type CommitFunc deprecated

type CommitFunc struct {
	// contains filtered or unexported fields
}

Deprecated: please use the version in the dprocedures package

func (*CommitFunc) Children

func (cf *CommitFunc) Children() []sql.Expression

func (*CommitFunc) Eval

func (cf *CommitFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*CommitFunc) IsNullable

func (cf *CommitFunc) IsNullable() bool

IsNullable implements the Expression interface.

func (*CommitFunc) Resolved

func (cf *CommitFunc) Resolved() bool

func (*CommitFunc) String

func (cf *CommitFunc) String() string

String implements the Stringer interface.

func (*CommitFunc) Type

func (cf *CommitFunc) Type() sql.Type

func (*CommitFunc) WithChildren

func (cf *CommitFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type ConstraintsVerifyFunc

type ConstraintsVerifyFunc struct {
	expression.NaryExpression
	// contains filtered or unexported fields
}

ConstraintsVerifyFunc represents the sql functions "verify_constraints" and "verify_constraints_all". Deprecated: please use the version in the dprocedures package

func (*ConstraintsVerifyFunc) Children

func (vc *ConstraintsVerifyFunc) Children() []sql.Expression

Children implements the Expression interface.

func (*ConstraintsVerifyFunc) Eval

func (vc *ConstraintsVerifyFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*ConstraintsVerifyFunc) IsNullable

func (vc *ConstraintsVerifyFunc) IsNullable() bool

IsNullable implements the Expression interface.

func (*ConstraintsVerifyFunc) Resolved

func (vc *ConstraintsVerifyFunc) Resolved() bool

Resolved implements the Expression interface.

func (*ConstraintsVerifyFunc) String

func (vc *ConstraintsVerifyFunc) String() string

String implements the Stringer interface.

func (*ConstraintsVerifyFunc) Type

func (vc *ConstraintsVerifyFunc) Type() sql.Type

func (*ConstraintsVerifyFunc) WithChildren

func (vc *ConstraintsVerifyFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type DoltAddFunc deprecated

type DoltAddFunc struct {
	// contains filtered or unexported fields
}

Deprecated: please use the version in the dprocedures package

func (DoltAddFunc) Children

func (d DoltAddFunc) Children() []sql.Expression

func (DoltAddFunc) Eval

func (d DoltAddFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltAddFunc) IsNullable

func (d DoltAddFunc) IsNullable() bool

func (DoltAddFunc) Resolved

func (d DoltAddFunc) Resolved() bool

func (DoltAddFunc) String

func (d DoltAddFunc) String() string

func (DoltAddFunc) Type

func (d DoltAddFunc) Type() sql.Type

func (DoltAddFunc) WithChildren

func (d DoltAddFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltBackupFunc deprecated

type DoltBackupFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltBackupFunc) Eval

func (d DoltBackupFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltBackupFunc) String

func (d DoltBackupFunc) String() string

func (DoltBackupFunc) Type

func (d DoltBackupFunc) Type() sql.Type

func (DoltBackupFunc) WithChildren

func (d DoltBackupFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltBranchFunc deprecated

type DoltBranchFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltBranchFunc) Eval

func (d DoltBranchFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltBranchFunc) String

func (d DoltBranchFunc) String() string

func (DoltBranchFunc) Type

func (d DoltBranchFunc) Type() sql.Type

func (DoltBranchFunc) WithChildren

func (d DoltBranchFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltCheckoutFunc deprecated

type DoltCheckoutFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltCheckoutFunc) Eval

func (d DoltCheckoutFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltCheckoutFunc) String

func (d DoltCheckoutFunc) String() string

func (DoltCheckoutFunc) Type

func (d DoltCheckoutFunc) Type() sql.Type

func (DoltCheckoutFunc) WithChildren

func (d DoltCheckoutFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltCleanFunc deprecated

type DoltCleanFunc struct {
	// contains filtered or unexported fields
}

Deprecated: please use the version in the dprocedures package

func (DoltCleanFunc) Children

func (d DoltCleanFunc) Children() []sql.Expression

func (DoltCleanFunc) Eval

func (d DoltCleanFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltCleanFunc) IsNullable

func (d DoltCleanFunc) IsNullable() bool

func (DoltCleanFunc) Resolved

func (d DoltCleanFunc) Resolved() bool

func (DoltCleanFunc) String

func (d DoltCleanFunc) String() string

func (DoltCleanFunc) Type

func (d DoltCleanFunc) Type() sql.Type

func (DoltCleanFunc) WithChildren

func (d DoltCleanFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltCommitFunc

type DoltCommitFunc struct {
	// contains filtered or unexported fields
}

DoltCommitFunc runs a `dolt commit` in the SQL context, committing staged changes to head. Deprecated: please use the version in the dprocedures package

func (DoltCommitFunc) Children

func (d DoltCommitFunc) Children() []sql.Expression

func (DoltCommitFunc) Eval

func (d DoltCommitFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltCommitFunc) IsNullable

func (d DoltCommitFunc) IsNullable() bool

func (DoltCommitFunc) Resolved

func (d DoltCommitFunc) Resolved() bool

func (DoltCommitFunc) String

func (d DoltCommitFunc) String() string

func (DoltCommitFunc) Type

func (d DoltCommitFunc) Type() sql.Type

func (DoltCommitFunc) WithChildren

func (d DoltCommitFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltFetchFunc deprecated

type DoltFetchFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltFetchFunc) Eval

func (d DoltFetchFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltFetchFunc) String

func (d DoltFetchFunc) String() string

func (DoltFetchFunc) Type

func (d DoltFetchFunc) Type() sql.Type

func (DoltFetchFunc) WithChildren

func (d DoltFetchFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltMergeFunc deprecated

type DoltMergeFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltMergeFunc) Eval

func (d DoltMergeFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltMergeFunc) String

func (d DoltMergeFunc) String() string

func (DoltMergeFunc) Type

func (d DoltMergeFunc) Type() sql.Type

func (DoltMergeFunc) WithChildren

func (d DoltMergeFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltPullFunc deprecated

type DoltPullFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltPullFunc) Eval

func (d DoltPullFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltPullFunc) String

func (d DoltPullFunc) String() string

func (DoltPullFunc) Type

func (d DoltPullFunc) Type() sql.Type

func (DoltPullFunc) WithChildren

func (d DoltPullFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltPushFunc deprecated

type DoltPushFunc struct {
	expression.NaryExpression
}

Deprecated: please use the version in the dprocedures package

func (DoltPushFunc) Eval

func (d DoltPushFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltPushFunc) String

func (d DoltPushFunc) String() string

func (DoltPushFunc) Type

func (d DoltPushFunc) Type() sql.Type

func (DoltPushFunc) WithChildren

func (d DoltPushFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type DoltResetFunc deprecated

type DoltResetFunc struct {
	// contains filtered or unexported fields
}

Deprecated: please use the version in the dprocedures package

func (DoltResetFunc) Children

func (d DoltResetFunc) Children() []sql.Expression

func (DoltResetFunc) Eval

func (d DoltResetFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (DoltResetFunc) IsNullable

func (d DoltResetFunc) IsNullable() bool

func (DoltResetFunc) Resolved

func (d DoltResetFunc) Resolved() bool

func (DoltResetFunc) String

func (d DoltResetFunc) String() string

func (DoltResetFunc) Type

func (d DoltResetFunc) Type() sql.Type

func (DoltResetFunc) WithChildren

func (d DoltResetFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

type HashOf

type HashOf struct {
	expression.UnaryExpression
}

func (*HashOf) Eval

func (t *HashOf) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*HashOf) IsNullable

func (t *HashOf) IsNullable() bool

IsNullable implements the Expression interface.

func (*HashOf) String

func (t *HashOf) String() string

String implements the Stringer interface.

func (*HashOf) Type

func (t *HashOf) Type() sql.Type

Type implements the Expression interface.

func (*HashOf) WithChildren

func (t *HashOf) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MergeBase

type MergeBase struct {
	expression.BinaryExpression
}

func (MergeBase) Eval

func (d MergeBase) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (MergeBase) String

func (d MergeBase) String() string

String implements the sql.Expression interface.

func (MergeBase) Type

func (d MergeBase) Type() sql.Type

Type implements the sql.Expression interface.

func (MergeBase) WithChildren

func (d MergeBase) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type MergeFunc deprecated

type MergeFunc struct {
	// contains filtered or unexported fields
}

Deprecated: please use the version in the dprocedures package

func (*MergeFunc) Children

func (mf *MergeFunc) Children() []sql.Expression

func (*MergeFunc) Eval

func (mf *MergeFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*MergeFunc) IsNullable

func (mf *MergeFunc) IsNullable() bool

IsNullable implements the Expression interface.

func (*MergeFunc) Resolved

func (mf *MergeFunc) Resolved() bool

func (*MergeFunc) String

func (mf *MergeFunc) String() string

String implements the Stringer interface.

func (*MergeFunc) Type

func (mf *MergeFunc) Type() sql.Type

Type implements the Expression interface.

func (*MergeFunc) WithChildren

func (mf *MergeFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type RevertFunc

type RevertFunc struct {
	expression.NaryExpression
}

RevertFunc represents the dolt function "dolt revert". Deprecated: please use the version in the dprocedures package

func (*RevertFunc) Children

func (r *RevertFunc) Children() []sql.Expression

Children implements the Expression interface.

func (*RevertFunc) Eval

func (r *RevertFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*RevertFunc) IsNullable

func (r *RevertFunc) IsNullable() bool

IsNullable implements the Expression interface.

func (*RevertFunc) Resolved

func (r *RevertFunc) Resolved() bool

Resolved implements the Expression interface.

func (*RevertFunc) String

func (r *RevertFunc) String() string

String implements the Stringer interface.

func (*RevertFunc) Type

func (r *RevertFunc) Type() sql.Type

func (*RevertFunc) WithChildren

func (r *RevertFunc) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Version

type Version struct{}

func (*Version) Children

func (*Version) Children() []sql.Expression

Children implements the Expression interface.

func (*Version) Eval

func (*Version) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Version) IsNullable

func (*Version) IsNullable() bool

IsNullable implements the Expression interface.

func (*Version) Resolved

func (*Version) Resolved() bool

Resolved implements the Expression interface.

func (*Version) String

func (*Version) String() string

String implements the Stringer interface.

func (*Version) Type

func (*Version) Type() sql.Type

Type implements the Expression interface.

func (*Version) WithChildren

func (v *Version) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

Jump to

Keyboard shortcuts

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