Documentation
¶
Overview ¶
Package sqlite provides the schema interface for an SQLite database.
Index ¶
- Constants
- type Column
- func (col Column) ColumnType() ColumnType
- func (col Column) Default() (interface{}, error)
- func (col Column) GoType() interface{}
- func (col Column) Hidden() bool
- func (col Column) Index() int
- func (col Column) IsPrimary() (bool, int)
- func (col Column) Name() string
- func (col Column) Nullable() bool
- func (col Column) RawType() string
- func (col Column) Type() (typ string)
- type ColumnType
- type DB
- type ForeignKey
- func (key ForeignKey) FromColumn() string
- func (key ForeignKey) FromTable() string
- func (key ForeignKey) ID() int
- func (key ForeignKey) Match() string
- func (key ForeignKey) OnDelete() string
- func (key ForeignKey) OnUpdate() string
- func (key ForeignKey) Seq() int
- func (key ForeignKey) ToColumn() string
- func (key ForeignKey) ToTable() string
- type Index
- type Object
- type RowScanner
- type Schema
- type Table
- func (tbl Table) Columns() (cols []schema.Column, err error)
- func (tbl Table) ForeignKeys() (keys []schema.ForeignKey, err error)
- func (tbl Table) Indexes() (indexes []schema.Index, err error)
- func (tbl Table) Name() string
- func (tbl Table) SQL() string
- func (tbl Table) Temporary() bool
- func (tbl Table) Triggers() (triggers []schema.Trigger, err error)
- type Trigger
- type View
Constants ¶
View Source
const ( ObjectTypeTrigger = "trigger" ObjectTypeTable = "table" ObjectTypeIndex = "index" ObjectTypeView = "view" )
View Source
const ( ColumnTypeStandard = ColumnType(iota) ColumnTypeHidden ColumnTypeGeneratedStored ColumnTypeGeneratedVirtual )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
func (Column) ColumnType ¶
func (col Column) ColumnType() ColumnType
type ColumnType ¶
type ColumnType int
type DB ¶
type DB struct { // We will start by using the sql.DB object, which is generic, and switch to the sqlite3.SQLiteConn object // if we need to. DB database DBName string *Schema // contains filtered or unexported fields }
func (*DB) SchemaName ¶
type ForeignKey ¶
type ForeignKey struct {
// contains filtered or unexported fields
}
func (ForeignKey) FromColumn ¶
func (key ForeignKey) FromColumn() string
func (ForeignKey) FromTable ¶
func (key ForeignKey) FromTable() string
func (ForeignKey) ID ¶
func (key ForeignKey) ID() int
func (ForeignKey) Match ¶
func (key ForeignKey) Match() string
func (ForeignKey) OnDelete ¶
func (key ForeignKey) OnDelete() string
func (ForeignKey) OnUpdate ¶
func (key ForeignKey) OnUpdate() string
func (ForeignKey) Seq ¶
func (key ForeignKey) Seq() int
func (ForeignKey) ToColumn ¶
func (key ForeignKey) ToColumn() string
func (ForeignKey) ToTable ¶
func (key ForeignKey) ToTable() string
type RowScanner ¶
type RowScanner interface {
Scan(dest ...interface{}) error
}
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (Table) ForeignKeys ¶
func (tbl Table) ForeignKeys() (keys []schema.ForeignKey, err error)
Click to show internal directories.
Click to hide internal directories.