Versions in this module Expand all Collapse all v0 v0.40.4 May 19, 2022 Changes in this version + const DiffCommitDateTag + const DiffCommitTag + const DiffTypeTag + const DocNameTag + const DocTextTag + const DoltConstraintViolationsInfoTag + const DoltConstraintViolationsTypeTag + const DoltProceduresCreateStmtTag + const DoltProceduresCreatedAtTag + const DoltProceduresModifiedAtTag + const DoltProceduresNameTag + const DoltSchemasExtraTag + const DoltSchemasFragmentTag + const DoltSchemasIdTag + const DoltSchemasNameTag + const DoltSchemasTypeTag + const HistoryCommitDateTag + const HistoryCommitHashTag + const HistoryCommitterTag + const InvalidTag + const KeylessRowCardinalityTag + const KeylessRowIdTag + const NotNullConstraintType + const QueryCatalogDescriptionTag + const QueryCatalogIdTag + const QueryCatalogNameTag + const QueryCatalogOrderTag + const QueryCatalogQueryTag + const ReservedTagMin + const SystemTableReservedMin + var EmptyColColl = &ColCollection + var EmptySchema = &schemaImpl + var ErrColNameCollision = errors.New("two different columns with the same name exist") + var ErrColNotFound = errors.New("column not found") + var ErrColTagCollision = errors.New("two different columns with the same tag") + var ErrInvalidPkOrdinals = errors.New("incorrect number of primary key ordinals") + var ErrMultipleNotNullConstraints = errors.New("multiple not null constraints on same column") + var ErrNoPrimaryKeyColumns = errors.New("no primary key columns") + var ErrNonAutoIncType = errors.New("column type cannot be auto incremented") + var ErrUsingSpatialKey = errors.NewKind("can't use Spatial Types as Primary Key for table %s") + var FeatureFlagKeylessSchema = true + var InvalidCol = Column + var KindToLwrStr = make(map[types.NomsKind]string) + var LwrStrToKind = make(map[string]types.NomsKind) + func ArePrimaryKeySetsDiffable(fromSch, toSch Schema) bool + func AutoGenerateTag(existingTags *set.Uint64Set, tableName string, ...) uint64 + func ColCollsAreCompatible(cc1, cc2 *ColCollection) bool + func ColCollsAreEqual(cc1, cc2 *ColCollection) bool + func ColConstraintsAreEqual(a, b []ColConstraint) bool + func ErrTagPrevUsed(tag uint64, newColName, tableName string) error + func ExtractAllColNames(sch Schema) (map[uint64]string, error) + func HasAutoIncrement(sch Schema) (ok bool) + func IndexOfConstraint(constraints []ColConstraint, constraintType string) int + func IsColSpatialType(c Column) bool + func IsKeyless(sch Schema) bool + func IsUsingSpatialColAsKey(sch Schema) bool + func NewCheck(name, expression string, enforced bool) check + func NomsKindsFromSchema(sch Schema) []types.NomsKind + func SchemasAreEqual(sch1, sch2 Schema) bool + func ValidateColumnConstraints(allCols *ColCollection) error + func ValidateForInsert(allCols *ColCollection) error + func VerifyInSchema(inSch, outSch Schema) (bool, error) + type Check interface + Enforced func() bool + Expression func() string + Name func() string + type CheckCollection interface + AddCheck func(name, expression string, enforce bool) (Check, error) + AllChecks func() []Check + Count func() int + DropCheck func(name string) error + func NewCheckCollection() CheckCollection + type ColCollection struct + LowerNameToCol map[string]Column + NameToCol map[string]Column + SortedTags []uint64 + TagToCol map[uint64]Column + TagToIdx map[uint64]int + Tags []uint64 + func ColCollUnion(colColls ...*ColCollection) (*ColCollection, error) + func ColCollectionSetDifference(leftCC, rightCC *ColCollection) (d *ColCollection) + func FilterColCollection(cc *ColCollection, cb func(col Column) bool) *ColCollection + func MapColCollection(cc *ColCollection, cb func(col Column) Column) *ColCollection + func NewColCollection(cols ...Column) *ColCollection + func (cc *ColCollection) Append(cols ...Column) *ColCollection + func (cc *ColCollection) AppendColl(colColl *ColCollection) *ColCollection + func (cc *ColCollection) GetAtIndex(i int) Column + func (cc *ColCollection) GetByIndex(idx int) Column + func (cc *ColCollection) GetByName(name string) (Column, bool) + func (cc *ColCollection) GetByNameCaseInsensitive(name string) (Column, bool) + func (cc *ColCollection) GetByTag(tag uint64) (Column, bool) + func (cc *ColCollection) GetColumnNames() []string + func (cc *ColCollection) GetColumns() []Column + func (cc *ColCollection) IndexOf(colName string) int + func (cc *ColCollection) Iter(cb func(tag uint64, col Column) (stop bool, err error)) error + func (cc *ColCollection) IterInSortedOrder(cb func(tag uint64, col Column) (stop bool)) + func (cc *ColCollection) Size() int + type ColConstraint interface + GetConstraintParams func() map[string]string + GetConstraintType func() string + SatisfiesConstraint func(value types.Value) bool + func ColConstraintFromTypeAndParams(colCnstType string, params map[string]string) ColConstraint + type Column struct + AutoIncrement bool + Comment string + Constraints []ColConstraint + Default string + IsPartOfPK bool + Kind types.NomsKind + Name string + Tag uint64 + TypeInfo typeinfo.TypeInfo + func ColFromName(sch Schema, name string) (Column, bool) + func ColFromTag(sch Schema, tag uint64) (Column, bool) + func GetSharedCols(schema Schema, cmpNames []string, cmpKinds []types.NomsKind) []Column + func NewColumn(name string, tag uint64, kind types.NomsKind, partOfPK bool, ...) Column + func NewColumnWithTypeInfo(name string, tag uint64, typeInfo typeinfo.TypeInfo, partOfPK bool, ...) (Column, error) + func (c Column) Compatible(other Column) bool + func (c Column) Equals(other Column) bool + func (c Column) IsNullable() bool + func (c Column) KindString() string + type ColumnOrder struct + AfterColumn string + First bool + type Index interface + AllTags func() []uint64 + ColumnNames func() []string + Comment func() string + Count func() int + DeepEquals func(other Index) bool + Equals func(other Index) bool + GetColumn func(tag uint64) (Column, bool) + IndexedColumnTags func() []uint64 + IsUnique func() bool + IsUserDefined func() bool + Name func() string + PrimaryKeyTags func() []uint64 + Schema func() Schema + ToTableTuple func(ctx context.Context, fullKey types.Tuple, format *types.NomsBinFormat) (types.Tuple, error) + VerifyMap func(ctx context.Context, iter types.MapIterator, nbf *types.NomsBinFormat) error + func NewIndex(name string, tags, allTags []uint64, indexColl *indexCollectionImpl, ...) Index + type IndexCollection interface + AddIndex func(indexes ...Index) + AddIndexByColNames func(indexName string, cols []string, props IndexProperties) (Index, error) + AddIndexByColTags func(indexName string, tags []uint64, props IndexProperties) (Index, error) + AllIndexes func() []Index + Contains func(indexName string) bool + Count func() int + Equals func(other IndexCollection) bool + GetByName func(indexName string) Index + GetByNameCaseInsensitive func(indexName string) (Index, bool) + GetIndexByColumnNames func(cols ...string) (Index, bool) + GetIndexByTags func(tags ...uint64) (Index, bool) + IndexesWithColumn func(columnName string) []Index + IndexesWithTag func(tag uint64) []Index + Iter func(cb func(index Index) (stop bool, err error)) error + Merge func(indexes ...Index) + RemoveIndex func(indexName string) (Index, error) + RenameIndex func(oldName, newName string) (Index, error) + SetPks func([]uint64) error + UnsafeAddIndexByColTags func(indexName string, tags []uint64, props IndexProperties) (Index, error) + func NewIndexCollection(cols *ColCollection, pkCols *ColCollection) IndexCollection + type IndexProperties struct + Comment string + IsUnique bool + IsUserDefined bool + type NotNullConstraint struct + func (nnc NotNullConstraint) GetConstraintParams() map[string]string + func (nnc NotNullConstraint) GetConstraintType() string + func (nnc NotNullConstraint) SatisfiesConstraint(value types.Value) bool + func (nnc NotNullConstraint) String() string + type Schema interface + AddColumn func(column Column, order *ColumnOrder) (Schema, error) + Checks func() CheckCollection + GetAllCols func() *ColCollection + GetNonPKCols func() *ColCollection + GetPKCols func() *ColCollection + GetPkOrdinals func() []int + Indexes func() IndexCollection + SetPkOrdinals func([]int) error + func Adapt(from, to Schema) (Schema, error) + func MustSchemaFromCols(typedColColl *ColCollection) Schema + func SchemaFromColCollections(allCols, pkColColl, nonPKColColl *ColCollection) Schema + func SchemaFromCols(allCols *ColCollection) (Schema, error) + func SchemaFromPKAndNonPKCols(pkCols, nonPKCols *ColCollection) (Schema, error) + func UnkeyedSchemaFromCols(allCols *ColCollection) Schema + type SuperSchema struct + func NewSuperSchema(schemas ...Schema) (*SuperSchema, error) + func SuperSchemaUnion(superSchemas ...*SuperSchema) (*SuperSchema, error) + func UnmarshalSuperSchema(allCols *ColCollection, tagNames map[uint64][]string) *SuperSchema + func (ss *SuperSchema) AddColumn(col Column) (err error) + func (ss *SuperSchema) AddSchemas(schemas ...Schema) error + func (ss *SuperSchema) AllColumnNames(tag uint64) []string + func (ss *SuperSchema) AllTags() []uint64 + func (ss *SuperSchema) Equals(oss *SuperSchema) bool + func (ss *SuperSchema) GenerateColCollection() (*ColCollection, error) + func (ss *SuperSchema) GenerateSchema() (Schema, error) + func (ss *SuperSchema) GetByTag(tag uint64) (Column, bool) + func (ss *SuperSchema) Iter(cb func(tag uint64, col Column) (stop bool, err error)) error + func (ss *SuperSchema) LatestColumnName(tag uint64) string + func (ss *SuperSchema) NameMapForSchema(sch Schema) (map[string]string, error) + func (ss *SuperSchema) Size() int