Documentation ¶
Overview ¶
Package models contains the types for schema ”.
Package models contains the types for schema ”.
Index ¶
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 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 sql.NullInt64 `json:"id"` // id Username sql.NullString `json:"username"` // username Address sql.NullString `json:"address"` // address FullName sql.NullString `json:"full_name"` // full_name // contains filtered or unexported fields }
User represents a row from 'users'.
func UserByID ¶
UserByID retrieves a row from 'users' as a User.
Generated from index 'users_id_pkey'.
func UserByUsername ¶
func UserByUsername(db XODB, username sql.NullString) (*User, error)
UserByUsername retrieves a row from 'users' as a User.
Generated from index 'sqlite_autoindex_users_1'.
func UsersByFullName ¶
func UsersByFullName(db XODB, fullName sql.NullString) ([]*User, error)
UsersByFullName retrieves a row from 'users' as a User.
Generated from index 'name_index'.
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 ”.
This should work with database/sql.DB and database/sql.Tx.