Documentation ¶
Overview ¶
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Index ¶
- Variables
- type ScannerValuer
- type SchemaMigration
- func (sm *SchemaMigration) Delete(db XODB) error
- func (sm *SchemaMigration) Deleted() bool
- func (sm *SchemaMigration) Exists() bool
- func (sm *SchemaMigration) Insert(db XODB) error
- func (sm *SchemaMigration) Save(db XODB) error
- func (sm *SchemaMigration) Update(db XODB) error
- func (sm *SchemaMigration) Upsert(db XODB) error
- type Slice
- type StringSlice
- type XODB
Constants ¶
This section is empty.
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type SchemaMigration ¶
type SchemaMigration struct { Version int64 `json:"version"` // version Dirty bool `json:"dirty"` // dirty // contains filtered or unexported fields }
SchemaMigration represents a row from 'public.schema_migrations'.
func SchemaMigrationByVersion ¶
func SchemaMigrationByVersion(db XODB, version int64) (*SchemaMigration, error)
SchemaMigrationByVersion retrieves a row from 'public.schema_migrations' as a SchemaMigration.
Generated from index 'schema_migrations_pkey'.
func (*SchemaMigration) Delete ¶
func (sm *SchemaMigration) Delete(db XODB) error
Delete deletes the SchemaMigration from the database.
func (*SchemaMigration) Deleted ¶
func (sm *SchemaMigration) Deleted() bool
Deleted provides information if the SchemaMigration has been deleted from the database.
func (*SchemaMigration) Exists ¶
func (sm *SchemaMigration) Exists() bool
Exists determines if the SchemaMigration exists in the database.
func (*SchemaMigration) Insert ¶
func (sm *SchemaMigration) Insert(db XODB) error
Insert inserts the SchemaMigration to the database.
func (*SchemaMigration) Save ¶
func (sm *SchemaMigration) Save(db XODB) error
Save saves the SchemaMigration to the database.
func (*SchemaMigration) Update ¶
func (sm *SchemaMigration) Update(db XODB) error
Update updates the SchemaMigration in the database.
func (*SchemaMigration) Upsert ¶
func (sm *SchemaMigration) Upsert(db XODB) error
Upsert performs an upsert for SchemaMigration.
NOTE: PostgreSQL 9.5+ only
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.