Versions in this module Expand all Collapse all v0 v0.11.0 Sep 9, 2026 Changes in this version + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type GetTableRowSecurityParams struct + SchemaName string + TableName string + type GetTypeDefinitionParams struct + SchemaName string + TypeName string + type ListColumnsForTableParams struct + SchemaName string + TableName string + type ListColumnsForTableRow struct + CollationName string + ColumnComment string + ColumnDefault string + ColumnName string + DataType string + GenerationExpression string + IdentityGeneration string + IsGenerated bool + IsIdentity bool + IsNullable bool + type ListConstraintsForTableParams struct + SchemaName string + TableName string + type ListConstraintsForTableRow struct + CheckExpr string + Columns []string + ConstraintName string + ConstraintType string + InitiallyDeferred bool + IsDeferrable bool + OnDelete string + OnUpdate string + RefColumns []string + RefTable string + type ListExtensionsRow struct + Comment string + Name string + Relocatable sql.NullBool + Schema string + Version string + type ListFunctionsForSchemaRow struct + Body string + Comment string + FunctionName string + IsStrict sql.NullBool + Language string + ReturnType string + Security string + Signature string + Volatility string + type ListIndexesForTableParams struct + SchemaName string + TableName string + type ListIndexesForTableRow struct + Columns []string + Definition string + IndexMethod string + IndexName string + IsPrimary sql.NullBool + IsUnique sql.NullBool + WhereClause string + type ListMaterializedViewsForSchemaRow struct + Comment string + Definition string + IsPopulated sql.NullBool + MatviewName string + type ListPoliciesForTableParams struct + SchemaName string + TableName string + type ListPoliciesForTableRow struct + Command string + Permissive sql.NullBool + PolicyName string + Roles []string + UsingExpr string + WithCheckExpr string + type ListSequencesForSchemaRow struct + CacheSize int64 + DataType string + Increment int64 + IsCycle sql.NullBool + MaxValue int64 + MinValue int64 + OwnedBy string + SequenceName string + StartValue int64 + type ListSignatureConstraintsRow struct + ConstraintName string + Definition string + SchemaName string + TableName string + type ListSignatureExtensionsRow struct + Name string + Version string + type ListSignatureFunctionsRow struct + Definition string + FunctionName string + IdentityArguments string + SchemaName string + type ListSignatureIndexesRow struct + Definition string + IndexName string + SchemaName string + TableName string + type ListSignaturePoliciesRow struct + CheckExpr string + Command string + Permissive bool + PolicyName string + SchemaName string + TableName string + UsingExpr string + type ListSignatureTableColumnsRow struct + Attnum int32 + ColumnName string + DataType string + DefaultExpr string + NotNull bool + SchemaName string + TableName string + type ListSignatureTriggersRow struct + Definition string + SchemaName string + TableName string + TriggerName string + type ListSignatureViewsRow struct + Definition string + RelKind string + SchemaName string + ViewName string + type ListTablesForSchemaRow struct + TableComment string + TableName string + type ListTriggersForTableParams struct + SchemaName string + TableName string + type ListTriggersForTableRow struct + Condition string + Events []string + FunctionName string + IsEnabled bool + Level string + Timing string + TriggerName string + type ListTypesForSchemaRow struct + Comment string + EnumElements []string + TypeKind string + TypeName string + type ListViewsForSchemaRow struct + Comment string + Definition string + ViewName string + type PgAm struct + Amname sql.NullString + Oid sql.NullInt64 + type PgAttrdef struct + Adbin sql.NullString + Adnum sql.NullInt32 + Adrelid sql.NullInt64 + type PgAttribute struct + Attisdropped sql.NullBool + Attname sql.NullString + Attnotnull sql.NullBool + Attnum sql.NullInt32 + Attrelid sql.NullInt64 + Atttypid sql.NullInt64 + Atttypmod sql.NullInt32 + type PgClass struct + Oid sql.NullInt64 + Relam sql.NullInt64 + Relkind sql.NullString + Relname sql.NullString + Relnamespace sql.NullInt64 + Relrowsecurity sql.NullBool + type PgConstraint struct + Condeferrable sql.NullBool + Condeferred sql.NullBool + Conname sql.NullString + Connamespace sql.NullInt64 + Conrelid sql.NullInt64 + Oid sql.NullInt64 + type PgDepend struct + Deptype sql.NullString + Objid sql.NullInt64 + Refobjid sql.NullInt64 + Refobjsubid sql.NullInt32 + type PgDescription struct + Description sql.NullString + Objoid sql.NullInt64 + Objsubid sql.NullInt32 + type PgEnum struct + Enumlabel sql.NullString + Enumsortorder sql.NullFloat64 + Enumtypid sql.NullInt64 + type PgExtension struct + Extname sql.NullString + Extnamespace sql.NullInt64 + Extrelocatable sql.NullBool + Extversion sql.NullString + Oid sql.NullInt64 + type PgIndex struct + Indexrelid sql.NullInt64 + Indisprimary sql.NullBool + Indisunique sql.NullBool + Indkey []int32 + Indpred sql.NullString + Indrelid sql.NullInt64 + type PgLanguage struct + Lanname sql.NullString + Oid sql.NullInt64 + type PgMatview struct + Definition sql.NullString + Ispopulated sql.NullBool + Matviewname sql.NullString + Schemaname sql.NullString + type PgNamespace struct + Nspname sql.NullString + Oid sql.NullInt64 + type PgPolicy struct + Polcmd sql.NullString + Polname sql.NullString + Polpermissive sql.NullBool + Polqual sql.NullString + Polrelid sql.NullInt64 + Polroles []int64 + Polwithcheck sql.NullString + type PgProc struct + Oid sql.NullInt64 + Proisstrict sql.NullBool + Prokind sql.NullString + Prolang sql.NullInt64 + Proname sql.NullString + Pronamespace sql.NullInt64 + Prosecdef sql.NullBool + Provolatile sql.NullString + type PgRole struct + Oid sql.NullInt64 + Rolname sql.NullString + type PgSequence struct + Seqcache sql.NullInt64 + Seqcycle sql.NullBool + Seqincrement sql.NullInt64 + Seqmax sql.NullInt64 + Seqmin sql.NullInt64 + Seqrelid sql.NullInt64 + Seqstart sql.NullInt64 + Seqtypid sql.NullInt64 + type PgTrigger struct + Oid sql.NullInt64 + Tgenabled sql.NullString + Tgfoid sql.NullInt64 + Tgisinternal sql.NullBool + Tgname sql.NullString + Tgqual sql.NullString + Tgrelid sql.NullInt64 + Tgtype sql.NullInt32 + type PgType struct + Oid sql.NullInt64 + Typname sql.NullString + Typnamespace sql.NullInt64 + Typtype sql.NullString + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) GetPostgresVersion(ctx context.Context) (string, error) + func (q *Queries) GetSearchPath(ctx context.Context) (string, error) + func (q *Queries) GetTableRowSecurity(ctx context.Context, arg GetTableRowSecurityParams) (bool, error) + func (q *Queries) GetTypeDefinition(ctx context.Context, arg GetTypeDefinitionParams) (string, error) + func (q *Queries) ListColumnsForTable(ctx context.Context, arg ListColumnsForTableParams) ([]ListColumnsForTableRow, error) + func (q *Queries) ListConstraintsForTable(ctx context.Context, arg ListConstraintsForTableParams) ([]ListConstraintsForTableRow, error) + func (q *Queries) ListExtensions(ctx context.Context) ([]ListExtensionsRow, error) + func (q *Queries) ListFunctionsForSchema(ctx context.Context, schemaName string) ([]ListFunctionsForSchemaRow, error) + func (q *Queries) ListIndexesForTable(ctx context.Context, arg ListIndexesForTableParams) ([]ListIndexesForTableRow, error) + func (q *Queries) ListMaterializedViewsForSchema(ctx context.Context, schemaName string) ([]ListMaterializedViewsForSchemaRow, error) + func (q *Queries) ListPoliciesForTable(ctx context.Context, arg ListPoliciesForTableParams) ([]ListPoliciesForTableRow, error) + func (q *Queries) ListSequencesForSchema(ctx context.Context, schemaName string) ([]ListSequencesForSchemaRow, error) + func (q *Queries) ListSignatureConstraints(ctx context.Context) ([]ListSignatureConstraintsRow, error) + func (q *Queries) ListSignatureExtensions(ctx context.Context) ([]ListSignatureExtensionsRow, error) + func (q *Queries) ListSignatureFunctions(ctx context.Context) ([]ListSignatureFunctionsRow, error) + func (q *Queries) ListSignatureIndexes(ctx context.Context) ([]ListSignatureIndexesRow, error) + func (q *Queries) ListSignaturePolicies(ctx context.Context) ([]ListSignaturePoliciesRow, error) + func (q *Queries) ListSignatureTableColumns(ctx context.Context) ([]ListSignatureTableColumnsRow, error) + func (q *Queries) ListSignatureTriggers(ctx context.Context) ([]ListSignatureTriggersRow, error) + func (q *Queries) ListSignatureViews(ctx context.Context) ([]ListSignatureViewsRow, error) + func (q *Queries) ListTablesForSchema(ctx context.Context, schemaName string) ([]ListTablesForSchemaRow, error) + func (q *Queries) ListTriggersForTable(ctx context.Context, arg ListTriggersForTableParams) ([]ListTriggersForTableRow, error) + func (q *Queries) ListTypesForSchema(ctx context.Context, schemaName string) ([]ListTypesForSchemaRow, error) + func (q *Queries) ListUserSchemas(ctx context.Context) ([]string, error) + func (q *Queries) ListViewsForSchema(ctx context.Context, schemaName string) ([]ListViewsForSchemaRow, error) + func (q *Queries) WithTx(tx *sql.Tx) *Queries