Documentation
¶
Overview ¶
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Index ¶
- Variables
- type LocalIdentity
- func (li *LocalIdentity) Delete(db XODB) error
- func (li *LocalIdentity) Deleted() bool
- func (li *LocalIdentity) Exists() bool
- func (li *LocalIdentity) Insert(db XODB) error
- func (li *LocalIdentity) Save(db XODB) error
- func (li *LocalIdentity) Update(db XODB) error
- func (li *LocalIdentity) Upsert(db XODB) error
- func (li *LocalIdentity) User(db XODB) (*User, error)
- type ScannerValuer
- type Slice
- type StringSlice
- type User
- 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 LocalIdentity ¶
type LocalIdentity struct {
UserID uuid.UUID `json:"user_id"` // user_id
Password string `json:"password"` // password
// contains filtered or unexported fields
}
LocalIdentity represents a row from 'public.local_identities'.
func LocalIdentityByUserID ¶
func LocalIdentityByUserID(db XODB, userID uuid.UUID) (*LocalIdentity, error)
LocalIdentityByUserID retrieves a row from 'public.local_identities' as a LocalIdentity.
Generated from index 'local_identities_pkey'.
func (*LocalIdentity) Delete ¶
func (li *LocalIdentity) Delete(db XODB) error
Delete deletes the LocalIdentity from the database.
func (*LocalIdentity) Deleted ¶
func (li *LocalIdentity) Deleted() bool
Deleted provides information if the LocalIdentity has been deleted from the database.
func (*LocalIdentity) Exists ¶
func (li *LocalIdentity) Exists() bool
Exists determines if the LocalIdentity exists in the database.
func (*LocalIdentity) Insert ¶
func (li *LocalIdentity) Insert(db XODB) error
Insert inserts the LocalIdentity to the database.
func (*LocalIdentity) Save ¶
func (li *LocalIdentity) Save(db XODB) error
Save saves the LocalIdentity to the database.
func (*LocalIdentity) Update ¶
func (li *LocalIdentity) Update(db XODB) error
Update updates the LocalIdentity in the database.
func (*LocalIdentity) Upsert ¶
func (li *LocalIdentity) Upsert(db XODB) error
Upsert performs an upsert for LocalIdentity.
NOTE: PostgreSQL 9.5+ only
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
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 User ¶
type User struct {
ID uuid.UUID `json:"id"` // id
Name string `json:"name"` // name
Email string `json:"email"` // email
Active bool `json:"active"` // active
// contains filtered or unexported fields
}
User represents a row from 'public.users'.
func UserByEmail ¶
UserByEmail retrieves a row from 'public.users' as a User.
Generated from index 'users_email'.
func UserByID ¶
UserByID retrieves a row from 'public.users' as a User.
Generated from index 'users_pkey'.
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.