sqlite

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 13 Imported by: 19

Documentation

Index

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 CreateStmt

type CreateStmt struct {
	schema.Attr
	S string
}

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 Open

func Open(db schema.ExecQuerier) (*Driver, error)

Open opens a new SQLite driver.

func (Driver) Diff

func (d Driver) Diff() schema.Differ

Diff returns a SQLite schema differ.

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, _ *schema.InspectOptions) (*schema.Schema, error)

InspectSchema returns schema descriptions of all tables in the given schema.

func (*Driver) InspectTable

func (d *Driver) InspectTable(ctx context.Context, name string, opts *schema.InspectTableOptions) (*schema.Table, error)

InspectTable returns the schema description of the given table.

type File

type File struct {
	schema.Attr
	Name string
}

File describes a database file.

type IndexPredicate

type IndexPredicate struct {
	schema.Attr
	P string
}

IndexPredicate describes a partial index predicate. See: https://www.sqlite.org/partialindex.html

type WithoutRowID

type WithoutRowID struct {
	schema.Attr
}

WithoutRowID describes the `WITHOUT ROWID` configuration. See: https://sqlite.org/withoutrowid.html

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL