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 AutoIncrement
- type CreateStmt
- 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 File
- type IndexOrigin
- type IndexPredicate
- type UUIDType
- type WithoutRowID
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 AutoIncrement ¶ added in v0.1.0
AutoIncrement describes the `AUTOINCREMENT` configuration. https://www.sqlite.org/autoinc.html
type CreateStmt ¶
CreateStmt describes the SQL statement used to create a resource.
type Driver ¶
type Driver struct { schema.ExecQuerier // contains filtered or unexported fields }
Driver represents an SQLite driver for introspecting database schemas and apply migrations changes on them.
func (*Driver) FormatType ¶ added in v0.1.0
FormatType converts types to one format. A lowered format. This is due to SQLite flexibility to allow any data types and use a set of rules to define the type affinity. See: https://www.sqlite.org/datatype3.html
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 IndexOrigin ¶ added in v0.1.0
IndexOrigin describes how the index was created. See: https://www.sqlite.org/pragma.html#pragma_index_list
type IndexPredicate ¶
IndexPredicate describes a partial index predicate. See: https://www.sqlite.org/partialindex.html
type WithoutRowID ¶
WithoutRowID describes the `WITHOUT ROWID` configuration. See: https://sqlite.org/withoutrowid.html