Documentation ¶
Index ¶
- func Build(phrase string) *sqlx.Builder
- func MarshalSpec(v interface{}, marshaler schemaspec.Marshaler) ([]byte, error)
- func UnmarshalSpec(data []byte, unmarshaler schemaspec.Unmarshaler, v interface{}) error
- type ArrayType
- type BitType
- type CType
- type Check
- type ConType
- type CurrencyType
- type Driver
- func (d *Driver) Diff() schema.Differ
- func (d *Driver) FormatType(t schema.Type) (string, error)
- func (d *Driver) InspectRealm(ctx context.Context, opts *schema.InspectRealmOption) (*schema.Realm, error)
- func (d *Driver) InspectSchema(ctx context.Context, name string, opts *schema.InspectOptions) (*schema.Schema, error)
- func (d *Driver) InspectTable(ctx context.Context, name string, opts *schema.InspectTableOptions) (*schema.Table, error)
- func (d *Driver) Migrate() schema.Execer
- type EnumType
- type Identity
- type IndexColumnProperty
- type IndexPredicate
- type IndexType
- type NetworkType
- type SeqFuncExpr
- type SerialType
- type UUIDType
- type UserDefinedType
- type XMLType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalSpec ¶
func MarshalSpec(v interface{}, marshaler schemaspec.Marshaler) ([]byte, error)
MarshalSpec marshals v into an Atlas DDL document using a schemaspec.Marshaler.
func UnmarshalSpec ¶
func UnmarshalSpec(data []byte, unmarshaler schemaspec.Unmarshaler, v interface{}) error
UnmarshalSpec unmarshals an Atlas DDL document using an unmarshaler into v.
Types ¶
type ArrayType ¶
ArrayType defines an array type. https://www.postgresql.org/docs/current/arrays.html
type BitType ¶
BitType defines a bit type. https://www.postgresql.org/docs/current/datatype-bit.html
type Check ¶
Check attributes defines a CHECK constraint. https://www.postgresql.org/docs/current/catalog-pg-constraint.html
type ConType ¶
ConType describes constraint type. https://www.postgresql.org/docs/current/catalog-pg-constraint.html
type CurrencyType ¶
A CurrencyType defines a currency type.
type Driver ¶
type Driver struct { schema.ExecQuerier // contains filtered or unexported fields }
Driver represents a PostgreSQL driver for introspecting database schemas and apply migrations changes on them.
func (*Driver) FormatType ¶
FormatType converts schema type to its column form in the database. An error is returned if the type cannot be recognized.
func (*Driver) InspectRealm ¶
func (d *Driver) InspectRealm(ctx context.Context, opts *schema.InspectRealmOption) (*schema.Realm, error)
InspectRealm returns schema descriptions of all resources in the given realm.
func (*Driver) InspectSchema ¶
func (d *Driver) InspectSchema(ctx context.Context, name string, opts *schema.InspectOptions) (*schema.Schema, error)
InspectSchema returns schema descriptions of all tables in the given schema.
type IndexColumnProperty ¶
IndexColumnProperty describes an index column property. https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-INDEX-COLUMN-PROPS
type IndexPredicate ¶
IndexPredicate describes a partial index predicate. https://www.postgresql.org/docs/current/catalog-pg-index.html
type IndexType ¶
IndexType represents an index type. https://www.postgresql.org/docs/current/indexes-types.html
type NetworkType ¶
A NetworkType defines a network type. https://www.postgresql.org/docs/current/datatype-net-types.html
type SeqFuncExpr ¶
SeqFuncExpr describe a sequence generator function. https://www.postgresql.org/docs/current/functions-sequence.html
type SerialType ¶
A SerialType defines a serial type.
type UserDefinedType ¶
UserDefinedType defines a user-defined type attribute.