Versions in this module Expand all Collapse all v0 v0.8.3 Feb 14, 2025 v0.8.2 Feb 14, 2025 Changes in this version + const ColumnIdentityTypeAlways + const ColumnIdentityTypeByDefault + func EscapeIdentifier(name string) string + func FQEscapedColumnName(table SchemaQualifiedName, columnName string) string + type CheckConstraint struct + DependsOnFunctions []SchemaQualifiedName + Expression string + IsInheritable bool + IsValid bool + KeyColumns []string + Name string + func (c CheckConstraint) GetName() string + type Column struct + Collation SchemaQualifiedName + Default string + Identity *ColumnIdentity + IsNullable bool + Name string + Size int + Type string + func (c Column) GetName() string + func (c Column) IsCollated() bool + type ColumnIdentity struct + CacheSize int64 + Cycle bool + Increment int64 + MaxValue int64 + MinValue int64 + StartValue int64 + Type ColumnIdentityType + type ColumnIdentityType string + type Enum struct + Labels []string + type Extension struct + Version string + type ForeignKeyConstraint struct + ConstraintDef string + EscapedName string + ForeignTable SchemaQualifiedName + IsValid bool + OwningTable SchemaQualifiedName + func (f ForeignKeyConstraint) GetName() string + type Function struct + DependsOnFunctions []SchemaQualifiedName + FunctionDef string + Language string + type GetIndexDefStatement string + func (i GetIndexDefStatement) ToCreateIndexConcurrently() (string, error) + type GetSchemaOpt func(*getSchemaOptions) + func WithExcludeSchemas(schemas ...string) GetSchemaOpt + func WithIncludeSchemas(schemas ...string) GetSchemaOpt + type GetTriggerDefStatement string + func (g GetTriggerDefStatement) ToCreateOrReplace() (string, error) + type Index struct + Columns []string + Constraint *IndexConstraint + GetIndexDefStmt GetIndexDefStatement + IsInvalid bool + IsUnique bool + Name string + OwningTable SchemaQualifiedName + ParentIdx *SchemaQualifiedName + func (i Index) GetName() string + func (i Index) GetSchemaQualifiedName() SchemaQualifiedName + func (i Index) IsPk() bool + type IndexConstraint struct + ConstraintDef string + EscapedConstraintName string + IsLocal bool + Type IndexConstraintType + type IndexConstraintType string + const PkIndexConstraintType + type NamedSchema struct + Name string + func (n NamedSchema) GetName() string + type Object interface + GetName func() string + type Policy struct + AppliesTo []string + CheckExpression string + Cmd PolicyCmd + Columns []string + EscapedName string + IsPermissive bool + UsingExpression string + func (p Policy) GetName() string + type PolicyCmd string + const AllPolicyCmd + const DeletePolicyCmd + const InsertPolicyCmd + const SelectPolicyCmd + const UpdatePolicyCmd + type Procedure struct + Def string + type ReplicaIdentity string + const ReplicaIdentityDefault + const ReplicaIdentityFull + const ReplicaIdentityIndex + const ReplicaIdentityNothing + type Schema struct + Enums []Enum + Extensions []Extension + ForeignKeyConstraints []ForeignKeyConstraint + Functions []Function + Indexes []Index + NamedSchemas []NamedSchema + Procedures []Procedure + Sequences []Sequence + Tables []Table + Triggers []Trigger + func GetSchema(ctx context.Context, db queries.DBTX, opts ...GetSchemaOpt) (Schema, error) + func (s Schema) Hash() (string, error) + func (s Schema) Normalize() Schema + type SchemaQualifiedName struct + EscapedName string + SchemaName string + func (o SchemaQualifiedName) GetFQEscapedName() string + func (o SchemaQualifiedName) GetName() string + func (o SchemaQualifiedName) IsEmpty() bool + type Sequence struct + CacheSize int64 + Cycle bool + Increment int64 + MaxValue int64 + MinValue int64 + Owner *SequenceOwner + StartValue int64 + Type string + type SequenceOwner struct + ColumnName string + TableName SchemaQualifiedName + type Table struct + CheckConstraints []CheckConstraint + Columns []Column + ForValues string + ParentTable *SchemaQualifiedName + PartitionKeyDef string + Policies []Policy + RLSEnabled bool + RLSForced bool + ReplicaIdentity ReplicaIdentity + func (t Table) IsPartition() bool + func (t Table) IsPartitioned() bool + type Trigger struct + EscapedName string + Function SchemaQualifiedName + GetTriggerDefStmt GetTriggerDefStatement + OwningTable SchemaQualifiedName + func (t Trigger) GetName() string