package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
AsTargetStatus returns the Status as a TargetStatus.
FindAliasType finds the first element of type AliasType.
FindCheckConstraint finds the first element of type CheckConstraint.
FindCheckConstraintUnvalidated finds the first element of type CheckConstraintUnvalidated.
FindColumn finds the first element of type Column.
FindColumnComment finds the first element of type ColumnComment.
FindColumnComputeExpression finds the first element of type ColumnComputeExpression.
FindColumnDefaultExpression finds the first element of type ColumnDefaultExpression.
FindColumnFamily finds the first element of type ColumnFamily.
FindColumnName finds the first element of type ColumnName.
FindColumnNotNull finds the first element of type ColumnNotNull.
FindColumnOnUpdateExpression finds the first element of type ColumnOnUpdateExpression.
FindColumnType finds the first element of type ColumnType.
FindCompositeType finds the first element of type CompositeType.
FindCompositeTypeAttrName finds the first element of type CompositeTypeAttrName.
FindCompositeTypeAttrType finds the first element of type CompositeTypeAttrType.
FindConstraintComment finds the first element of type ConstraintComment.
FindConstraintWithoutIndexName finds the first element of type ConstraintWithoutIndexName.
FindDatabase finds the first element of type Database.
FindDatabaseComment finds the first element of type DatabaseComment.
FindDatabaseData finds the first element of type DatabaseData.
FindDatabaseRegionConfig finds the first element of type DatabaseRegionConfig.
FindDatabaseRoleSetting finds the first element of type DatabaseRoleSetting.
FindDatabaseZoneConfig finds the first element of type DatabaseZoneConfig.
FindEnumType finds the first element of type EnumType.
FindEnumTypeValue finds the first element of type EnumTypeValue.
FindForeignKeyConstraint finds the first element of type ForeignKeyConstraint.
FindForeignKeyConstraintUnvalidated finds the first element of type ForeignKeyConstraintUnvalidated.
FindFunction finds the first element of type Function.
FindFunctionBody finds the first element of type FunctionBody.
FindFunctionLeakProof finds the first element of type FunctionLeakProof.
FindFunctionName finds the first element of type FunctionName.
FindFunctionNullInputBehavior finds the first element of type FunctionNullInputBehavior.
FindFunctionSecurity finds the first element of type FunctionSecurity.
FindFunctionVolatility finds the first element of type FunctionVolatility.
FindIndexColumn finds the first element of type IndexColumn.
FindIndexComment finds the first element of type IndexComment.
FindIndexData finds the first element of type IndexData.
FindIndexName finds the first element of type IndexName.
FindIndexPartitioning finds the first element of type IndexPartitioning.
FindIndexZoneConfig finds the first element of type IndexZoneConfig.
FindLDRJobIDs finds the first element of type LDRJobIDs.
FindNamedRangeZoneConfig finds the first element of type NamedRangeZoneConfig.
FindNamespace finds the first element of type Namespace.
FindOwner finds the first element of type Owner.
FindPartitionZoneConfig finds the first element of type PartitionZoneConfig.
FindPolicy finds the first element of type Policy.
FindPolicyName finds the first element of type PolicyName.
FindPrimaryIndex finds the first element of type PrimaryIndex.
FindRowLevelTTL finds the first element of type RowLevelTTL.
FindSchema finds the first element of type Schema.
FindSchemaChild finds the first element of type SchemaChild.
FindSchemaComment finds the first element of type SchemaComment.
FindSchemaParent finds the first element of type SchemaParent.
FindSecondaryIndex finds the first element of type SecondaryIndex.
FindSecondaryIndexPartial finds the first element of type SecondaryIndexPartial.
FindSequence finds the first element of type Sequence.
FindSequenceOption finds the first element of type SequenceOption.
FindSequenceOwner finds the first element of type SequenceOwner.
FindTable finds the first element of type Table.
FindTableComment finds the first element of type TableComment.
FindTableData finds the first element of type TableData.
FindTableLocalityGlobal finds the first element of type TableLocalityGlobal.
FindTableLocalityPrimaryRegion finds the first element of type TableLocalityPrimaryRegion.
FindTableLocalityRegionalByRow finds the first element of type TableLocalityRegionalByRow.
FindTableLocalitySecondaryRegion finds the first element of type TableLocalitySecondaryRegion.
FindTablePartitioning finds the first element of type TablePartitioning.
FindTableSchemaLocked finds the first element of type TableSchemaLocked.
FindTableZoneConfig finds the first element of type TableZoneConfig.
FindTemporaryIndex finds the first element of type TemporaryIndex.
FindTrigger finds the first element of type Trigger.
FindTriggerDeps finds the first element of type TriggerDeps.
FindTriggerEnabled finds the first element of type TriggerEnabled.
FindTriggerEvents finds the first element of type TriggerEvents.
FindTriggerFunctionCall finds the first element of type TriggerFunctionCall.
FindTriggerName finds the first element of type TriggerName.
FindTriggerTiming finds the first element of type TriggerTiming.
FindTriggerTransition finds the first element of type TriggerTransition.
FindTriggerWhen finds the first element of type TriggerWhen.
FindTypeComment finds the first element of type TypeComment.
FindUniqueWithoutIndexConstraint finds the first element of type UniqueWithoutIndexConstraint.
FindUniqueWithoutIndexConstraintUnvalidated finds the first element of type UniqueWithoutIndexConstraintUnvalidated.
FindUserPrivileges finds the first element of type UserPrivileges.
FindView finds the first element of type View.
ForEachAliasType iterates over elements of type AliasType.
ForEachCheckConstraint iterates over elements of type CheckConstraint.
ForEachCheckConstraintUnvalidated iterates over elements of type CheckConstraintUnvalidated.
ForEachColumn iterates over elements of type Column.
ForEachColumnComment iterates over elements of type ColumnComment.
ForEachColumnComputeExpression iterates over elements of type ColumnComputeExpression.
ForEachColumnDefaultExpression iterates over elements of type ColumnDefaultExpression.
ForEachColumnFamily iterates over elements of type ColumnFamily.
ForEachColumnName iterates over elements of type ColumnName.
ForEachColumnNotNull iterates over elements of type ColumnNotNull.
ForEachColumnOnUpdateExpression iterates over elements of type ColumnOnUpdateExpression.
ForEachColumnType iterates over elements of type ColumnType.
ForEachCompositeType iterates over elements of type CompositeType.
ForEachCompositeTypeAttrName iterates over elements of type CompositeTypeAttrName.
ForEachCompositeTypeAttrType iterates over elements of type CompositeTypeAttrType.
ForEachConstraintComment iterates over elements of type ConstraintComment.
ForEachConstraintWithoutIndexName iterates over elements of type ConstraintWithoutIndexName.
ForEachDatabase iterates over elements of type Database.
ForEachDatabaseComment iterates over elements of type DatabaseComment.
ForEachDatabaseData iterates over elements of type DatabaseData.
ForEachDatabaseRegionConfig iterates over elements of type DatabaseRegionConfig.
ForEachDatabaseRoleSetting iterates over elements of type DatabaseRoleSetting.
ForEachDatabaseZoneConfig iterates over elements of type DatabaseZoneConfig.
ForEachElementType loops over each element type.
ForEachEnumType iterates over elements of type EnumType.
ForEachEnumTypeValue iterates over elements of type EnumTypeValue.
ForEachForeignKeyConstraint iterates over elements of type ForeignKeyConstraint.
ForEachForeignKeyConstraintUnvalidated iterates over elements of type ForeignKeyConstraintUnvalidated.
ForEachFunction iterates over elements of type Function.
ForEachFunctionBody iterates over elements of type FunctionBody.
ForEachFunctionLeakProof iterates over elements of type FunctionLeakProof.
ForEachFunctionName iterates over elements of type FunctionName.
ForEachFunctionNullInputBehavior iterates over elements of type FunctionNullInputBehavior.
ForEachFunctionSecurity iterates over elements of type FunctionSecurity.
ForEachFunctionVolatility iterates over elements of type FunctionVolatility.
ForEachIndexColumn iterates over elements of type IndexColumn.
ForEachIndexComment iterates over elements of type IndexComment.
ForEachIndexData iterates over elements of type IndexData.
ForEachIndexName iterates over elements of type IndexName.
ForEachIndexPartitioning iterates over elements of type IndexPartitioning.
ForEachIndexZoneConfig iterates over elements of type IndexZoneConfig.
ForEachLDRJobIDs iterates over elements of type LDRJobIDs.
ForEachNamedRangeZoneConfig iterates over elements of type NamedRangeZoneConfig.
ForEachNamespace iterates over elements of type Namespace.
ForEachOwner iterates over elements of type Owner.
ForEachPartitionZoneConfig iterates over elements of type PartitionZoneConfig.
ForEachPolicy iterates over elements of type Policy.
ForEachPolicyName iterates over elements of type PolicyName.
ForEachPrimaryIndex iterates over elements of type PrimaryIndex.
ForEachRowLevelTTL iterates over elements of type RowLevelTTL.
ForEachSchema iterates over elements of type Schema.
ForEachSchemaChild iterates over elements of type SchemaChild.
ForEachSchemaComment iterates over elements of type SchemaComment.
ForEachSchemaParent iterates over elements of type SchemaParent.
ForEachSecondaryIndex iterates over elements of type SecondaryIndex.
ForEachSecondaryIndexPartial iterates over elements of type SecondaryIndexPartial.
ForEachSequence iterates over elements of type Sequence.
ForEachSequenceOption iterates over elements of type SequenceOption.
ForEachSequenceOwner iterates over elements of type SequenceOwner.
ForEachTable iterates over elements of type Table.
ForEachTableComment iterates over elements of type TableComment.
ForEachTableData iterates over elements of type TableData.
ForEachTableLocalityGlobal iterates over elements of type TableLocalityGlobal.
ForEachTableLocalityPrimaryRegion iterates over elements of type TableLocalityPrimaryRegion.
ForEachTableLocalityRegionalByRow iterates over elements of type TableLocalityRegionalByRow.
ForEachTableLocalitySecondaryRegion iterates over elements of type TableLocalitySecondaryRegion.
ForEachTablePartitioning iterates over elements of type TablePartitioning.
ForEachTableSchemaLocked iterates over elements of type TableSchemaLocked.
ForEachTableZoneConfig iterates over elements of type TableZoneConfig.
ForEachTemporaryIndex iterates over elements of type TemporaryIndex.
ForEachTrigger iterates over elements of type Trigger.
ForEachTriggerDeps iterates over elements of type TriggerDeps.
ForEachTriggerEnabled iterates over elements of type TriggerEnabled.
ForEachTriggerEvents iterates over elements of type TriggerEvents.
ForEachTriggerFunctionCall iterates over elements of type TriggerFunctionCall.
ForEachTriggerName iterates over elements of type TriggerName.
ForEachTriggerTiming iterates over elements of type TriggerTiming.
ForEachTriggerTransition iterates over elements of type TriggerTransition.
ForEachTriggerWhen iterates over elements of type TriggerWhen.
ForEachTypeComment iterates over elements of type TypeComment.
ForEachUniqueWithoutIndexConstraint iterates over elements of type UniqueWithoutIndexConstraint.
ForEachUniqueWithoutIndexConstraintUnvalidated iterates over elements of type UniqueWithoutIndexConstraintUnvalidated.
ForEachUserPrivileges iterates over elements of type UserPrivileges.
ForEachView iterates over elements of type View.
GetElementOneOfProtos returns all one of protos.
GetElementTypes returns all element types.
GetNonTransientEquivalent is the reciprocal of GetTransientEquivalent and therefore take a TRANSIENT_ Status as input.
GetTransientEquivalent returns the equivalent TRANSIENT_ Status for a given status.
HasDeprecatedElements returns if the target contains any element or fields marked for deprecation.
MakeCurrentStateFromDescriptors constructs a CurrentState object from a slice of DescriptorState object from which the current state has been decomposed.
MakeTarget constructs a new Target.
MigrateCurrentState migrates a current state by upgrading elements based on the current version number.
MigrateDescriptorState migrates descriptor state and applies any changes relevant for the current cluster version.
NewElementCollection constructs a generic element collection containing the elements in `g` listed in the `indexes` slice.
# Constants
InvalidTarget indicates that the element doesn't have a target status for the current schema change.
PlaceHolderRoleName placeholder string for non-fetched role names.
ToAbsent indicates that the element should have status ABSENT after completion of the current schema change, meaning it should no longer exist.
ToPublic indicates that the element should have status PUBLIC after completion of the current schema change, meaning it should exist and not in any kind of transitory state.
Transient is like ToAbsent in that the element should no longer exist once the schema change is done.
# Variables
NumStatus is the number of values which Status may take on.
# Structs
CurrentState is a TargetState decorated with the current status of the elements in the target state.
ElementCollection represents an ordered set of (current status, target status, element) tuples, looked up in `g` by iterating through `indexes`.
# Interfaces
Element represents a logical component of a catalog entry's schema (e.g., an index or column in a table).
ElementCollectionGetter abstracts the actual mechanism for obtaining (current status, target status, element) tuples in an element collection.
HumanReadableNameProvider maps IDs to human-readable names for the purpose of decorating EXPLAIN(DDL) and other human-readable output.
# Type aliases
NameMappings implements the HumanReadableNameProvider interface.
SourceElementID elements ID's for identifying parent elements.
TargetStatus is the subset of Status values which serve as valid target statuses.