model

package
v0.0.0-...-0229530 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Package model contains the types for schema ”.

Index

Constants

This section is empty.

Variables

View Source
var XOLog = func(string, ...interface{}) {}

XOLog provides the log func used by generated queries.

Functions

This section is empty.

Types

type Address

type Address struct {
	ID      int64  // id
	Address string // address
	Name    string // name
	// contains filtered or unexported fields
}

Address represents a row from 'address'.

func AddressByAddressName

func AddressByAddressName(db XODB, address string, name string) (*Address, error)

AddressByAddressName retrieves a row from 'address' as a Address.

Generated from index 'uidx_address_address_name'.

func AddressByID

func AddressByID(db XODB, id int64) (*Address, error)

AddressByID retrieves a row from 'address' as a Address.

Generated from index 'address_id_pkey'.

func (*Address) Delete

func (a *Address) Delete(db XODB) error

Delete deletes the Address from the database.

func (*Address) Deleted

func (a *Address) Deleted() bool

Deleted provides information if the Address has been deleted from the database.

func (*Address) Exists

func (a *Address) Exists() bool

Exists determines if the Address exists in the database.

func (*Address) Insert

func (a *Address) Insert(db XODB) error

Insert inserts the Address to the database.

func (*Address) Save

func (a *Address) Save(db XODB) error

Save saves the Address to the database.

func (*Address) Update

func (a *Address) Update(db XODB) error

Update updates the Address in the database.

type AddressCc

type AddressCc struct {
	ID        int64 // id
	MailID    int64 // mail_id
	AddressID int64 // address_id
	// contains filtered or unexported fields
}

AddressCc represents a row from 'address_cc'.

func AddressCcByID

func AddressCcByID(db XODB, id int64) (*AddressCc, error)

AddressCcByID retrieves a row from 'address_cc' as a AddressCc.

Generated from index 'address_cc_id_pkey'.

func AddressCcsByAddressID

func AddressCcsByAddressID(db XODB, addressID int64) ([]*AddressCc, error)

AddressCcsByAddressID retrieves a row from 'address_cc' as a AddressCc.

Generated from index 'idx_address_cc_address_id'.

func AddressCcsByMailID

func AddressCcsByMailID(db XODB, mailID int64) ([]*AddressCc, error)

AddressCcsByMailID retrieves a row from 'address_cc' as a AddressCc.

Generated from index 'idx_address_cc_mail_id'.

func (*AddressCc) AddressByAddressID

func (ac *AddressCc) AddressByAddressID(db XODB) (*Address, error)

AddressByAddressID returns the Address associated with the AddressCc's AddressID (address_id).

Generated from foreign key 'address_cc_address_id_fkey'.

func (*AddressCc) Delete

func (ac *AddressCc) Delete(db XODB) error

Delete deletes the AddressCc from the database.

func (*AddressCc) Deleted

func (ac *AddressCc) Deleted() bool

Deleted provides information if the AddressCc has been deleted from the database.

func (*AddressCc) Exists

func (ac *AddressCc) Exists() bool

Exists determines if the AddressCc exists in the database.

func (*AddressCc) Insert

func (ac *AddressCc) Insert(db XODB) error

Insert inserts the AddressCc to the database.

func (*AddressCc) MailByMailID

func (ac *AddressCc) MailByMailID(db XODB) (*Mail, error)

MailByMailID returns the Mail associated with the AddressCc's MailID (mail_id).

Generated from foreign key 'address_cc_mail_id_fkey'.

func (*AddressCc) Save

func (ac *AddressCc) Save(db XODB) error

Save saves the AddressCc to the database.

func (*AddressCc) Update

func (ac *AddressCc) Update(db XODB) error

Update updates the AddressCc in the database.

type AddressFrom

type AddressFrom struct {
	ID        int64 // id
	MailID    int64 // mail_id
	AddressID int64 // address_id
	// contains filtered or unexported fields
}

AddressFrom represents a row from 'address_from'.

func AddressFromByID

func AddressFromByID(db XODB, id int64) (*AddressFrom, error)

AddressFromByID retrieves a row from 'address_from' as a AddressFrom.

Generated from index 'address_from_id_pkey'.

func AddressFromsByAddressID

func AddressFromsByAddressID(db XODB, addressID int64) ([]*AddressFrom, error)

AddressFromsByAddressID retrieves a row from 'address_from' as a AddressFrom.

Generated from index 'idx_address_from_address_id'.

func AddressFromsByMailID

func AddressFromsByMailID(db XODB, mailID int64) ([]*AddressFrom, error)

AddressFromsByMailID retrieves a row from 'address_from' as a AddressFrom.

Generated from index 'idx_address_from_mail_id'.

func (*AddressFrom) AddressByAddressID

func (af *AddressFrom) AddressByAddressID(db XODB) (*Address, error)

AddressByAddressID returns the Address associated with the AddressFrom's AddressID (address_id).

Generated from foreign key 'address_from_address_id_fkey'.

func (*AddressFrom) Delete

func (af *AddressFrom) Delete(db XODB) error

Delete deletes the AddressFrom from the database.

func (*AddressFrom) Deleted

func (af *AddressFrom) Deleted() bool

Deleted provides information if the AddressFrom has been deleted from the database.

func (*AddressFrom) Exists

func (af *AddressFrom) Exists() bool

Exists determines if the AddressFrom exists in the database.

func (*AddressFrom) Insert

func (af *AddressFrom) Insert(db XODB) error

Insert inserts the AddressFrom to the database.

func (*AddressFrom) MailByMailID

func (af *AddressFrom) MailByMailID(db XODB) (*Mail, error)

MailByMailID returns the Mail associated with the AddressFrom's MailID (mail_id).

Generated from foreign key 'address_from_mail_id_fkey'.

func (*AddressFrom) Save

func (af *AddressFrom) Save(db XODB) error

Save saves the AddressFrom to the database.

func (*AddressFrom) Update

func (af *AddressFrom) Update(db XODB) error

Update updates the AddressFrom in the database.

type AddressReplyto

type AddressReplyto struct {
	ID        int64 // id
	MailID    int64 // mail_id
	AddressID int64 // address_id
	// contains filtered or unexported fields
}

AddressReplyto represents a row from 'address_replyto'.

func AddressReplytoByID

func AddressReplytoByID(db XODB, id int64) (*AddressReplyto, error)

AddressReplytoByID retrieves a row from 'address_replyto' as a AddressReplyto.

Generated from index 'address_replyto_id_pkey'.

func AddressReplytosByAddressID

func AddressReplytosByAddressID(db XODB, addressID int64) ([]*AddressReplyto, error)

AddressReplytosByAddressID retrieves a row from 'address_replyto' as a AddressReplyto.

Generated from index 'idx_address_replyto_address_id'.

func AddressReplytosByMailID

func AddressReplytosByMailID(db XODB, mailID int64) ([]*AddressReplyto, error)

AddressReplytosByMailID retrieves a row from 'address_replyto' as a AddressReplyto.

Generated from index 'idx_address_replyto_mail_id'.

func (*AddressReplyto) AddressByAddressID

func (ar *AddressReplyto) AddressByAddressID(db XODB) (*Address, error)

AddressByAddressID returns the Address associated with the AddressReplyto's AddressID (address_id).

Generated from foreign key 'address_replyto_address_id_fkey'.

func (*AddressReplyto) Delete

func (ar *AddressReplyto) Delete(db XODB) error

Delete deletes the AddressReplyto from the database.

func (*AddressReplyto) Deleted

func (ar *AddressReplyto) Deleted() bool

Deleted provides information if the AddressReplyto has been deleted from the database.

func (*AddressReplyto) Exists

func (ar *AddressReplyto) Exists() bool

Exists determines if the AddressReplyto exists in the database.

func (*AddressReplyto) Insert

func (ar *AddressReplyto) Insert(db XODB) error

Insert inserts the AddressReplyto to the database.

func (*AddressReplyto) MailByMailID

func (ar *AddressReplyto) MailByMailID(db XODB) (*Mail, error)

MailByMailID returns the Mail associated with the AddressReplyto's MailID (mail_id).

Generated from foreign key 'address_replyto_mail_id_fkey'.

func (*AddressReplyto) Save

func (ar *AddressReplyto) Save(db XODB) error

Save saves the AddressReplyto to the database.

func (*AddressReplyto) Update

func (ar *AddressReplyto) Update(db XODB) error

Update updates the AddressReplyto in the database.

type AddressTo

type AddressTo struct {
	ID        int64 // id
	MailID    int64 // mail_id
	AddressID int64 // address_id
	// contains filtered or unexported fields
}

AddressTo represents a row from 'address_to'.

func AddressToByID

func AddressToByID(db XODB, id int64) (*AddressTo, error)

AddressToByID retrieves a row from 'address_to' as a AddressTo.

Generated from index 'address_to_id_pkey'.

func AddressTosByAddressID

func AddressTosByAddressID(db XODB, addressID int64) ([]*AddressTo, error)

AddressTosByAddressID retrieves a row from 'address_to' as a AddressTo.

Generated from index 'idx_address_to_address_id'.

func AddressTosByMailID

func AddressTosByMailID(db XODB, mailID int64) ([]*AddressTo, error)

AddressTosByMailID retrieves a row from 'address_to' as a AddressTo.

Generated from index 'idx_address_to_mail_id'.

func (*AddressTo) AddressByAddressID

func (at *AddressTo) AddressByAddressID(db XODB) (*Address, error)

AddressByAddressID returns the Address associated with the AddressTo's AddressID (address_id).

Generated from foreign key 'address_to_address_id_fkey'.

func (*AddressTo) Delete

func (at *AddressTo) Delete(db XODB) error

Delete deletes the AddressTo from the database.

func (*AddressTo) Deleted

func (at *AddressTo) Deleted() bool

Deleted provides information if the AddressTo has been deleted from the database.

func (*AddressTo) Exists

func (at *AddressTo) Exists() bool

Exists determines if the AddressTo exists in the database.

func (*AddressTo) Insert

func (at *AddressTo) Insert(db XODB) error

Insert inserts the AddressTo to the database.

func (*AddressTo) MailByMailID

func (at *AddressTo) MailByMailID(db XODB) (*Mail, error)

MailByMailID returns the Mail associated with the AddressTo's MailID (mail_id).

Generated from foreign key 'address_to_mail_id_fkey'.

func (*AddressTo) Save

func (at *AddressTo) Save(db XODB) error

Save saves the AddressTo to the database.

func (*AddressTo) Update

func (at *AddressTo) Update(db XODB) error

Update updates the AddressTo in the database.

type Flag

type Flag struct {
	ID   int64  // id
	Name string // name
	// contains filtered or unexported fields
}

Flag represents a row from 'flag'.

func FlagByID

func FlagByID(db XODB, id int64) (*Flag, error)

FlagByID retrieves a row from 'flag' as a Flag.

Generated from index 'flag_id_pkey'.

func FlagByName

func FlagByName(db XODB, name string) (*Flag, error)

FlagByName retrieves a row from 'flag' as a Flag.

Generated from index 'uidx_flag_name'.

func GetFlags

func GetFlags(db XODB) ([]*Flag, error)

GetFlags runs a custom query, returning results as Flag.

func (*Flag) Delete

func (f *Flag) Delete(db XODB) error

Delete deletes the Flag from the database.

func (*Flag) Deleted

func (f *Flag) Deleted() bool

Deleted provides information if the Flag has been deleted from the database.

func (*Flag) Exists

func (f *Flag) Exists() bool

Exists determines if the Flag exists in the database.

func (*Flag) Insert

func (f *Flag) Insert(db XODB) error

Insert inserts the Flag to the database.

func (*Flag) Save

func (f *Flag) Save(db XODB) error

Save saves the Flag to the database.

func (*Flag) Update

func (f *Flag) Update(db XODB) error

Update updates the Flag in the database.

type FlagMail

type FlagMail struct {
	ID     int64 // id
	FlagID int64 // flag_id
	MailID int64 // mail_id
	// contains filtered or unexported fields
}

FlagMail represents a row from 'flag_mail'.

func FlagMailByID

func FlagMailByID(db XODB, id int64) (*FlagMail, error)

FlagMailByID retrieves a row from 'flag_mail' as a FlagMail.

Generated from index 'flag_mail_id_pkey'.

func FlagMailsByFlagIDMailID

func FlagMailsByFlagIDMailID(db XODB, flagID int64, mailID int64) ([]*FlagMail, error)

FlagMailsByFlagIDMailID retrieves a row from 'flag_mail' as a FlagMail.

Generated from index 'idx_flag_mail_flag_id_mail_id'.

func FlagMailsByMailID

func FlagMailsByMailID(db XODB, mailID int64) ([]*FlagMail, error)

FlagMailsByMailID retrieves a row from 'flag_mail' as a FlagMail.

Generated from index 'idx_flag_mail_mail_id'.

func (*FlagMail) Delete

func (fm *FlagMail) Delete(db XODB) error

Delete deletes the FlagMail from the database.

func (*FlagMail) Deleted

func (fm *FlagMail) Deleted() bool

Deleted provides information if the FlagMail has been deleted from the database.

func (*FlagMail) Exists

func (fm *FlagMail) Exists() bool

Exists determines if the FlagMail exists in the database.

func (*FlagMail) Flag

func (fm *FlagMail) Flag(db XODB) (*Flag, error)

Flag returns the Flag associated with the FlagMail's FlagID (flag_id).

Generated from foreign key 'flag_mail_flag_id_fkey'.

func (*FlagMail) Insert

func (fm *FlagMail) Insert(db XODB) error

Insert inserts the FlagMail to the database.

func (*FlagMail) MailByMailID

func (fm *FlagMail) MailByMailID(db XODB) (*Mail, error)

MailByMailID returns the Mail associated with the FlagMail's MailID (mail_id).

Generated from foreign key 'flag_mail_mail_id_fkey'.

func (*FlagMail) Save

func (fm *FlagMail) Save(db XODB) error

Save saves the FlagMail to the database.

func (*FlagMail) Update

func (fm *FlagMail) Update(db XODB) error

Update updates the FlagMail in the database.

type Header struct {
	ID   int64  // id
	Name string // name
	// contains filtered or unexported fields
}

Header represents a row from 'header'.

func HeaderByID

func HeaderByID(db XODB, id int64) (*Header, error)

HeaderByID retrieves a row from 'header' as a Header.

Generated from index 'header_id_pkey'.

func HeaderByName

func HeaderByName(db XODB, name string) (*Header, error)

HeaderByName retrieves a row from 'header' as a Header.

Generated from index 'uidx_header_name'.

func (*Header) Delete

func (h *Header) Delete(db XODB) error

Delete deletes the Header from the database.

func (*Header) Deleted

func (h *Header) Deleted() bool

Deleted provides information if the Header has been deleted from the database.

func (*Header) Exists

func (h *Header) Exists() bool

Exists determines if the Header exists in the database.

func (*Header) Insert

func (h *Header) Insert(db XODB) error

Insert inserts the Header to the database.

func (*Header) Save

func (h *Header) Save(db XODB) error

Save saves the Header to the database.

func (*Header) Update

func (h *Header) Update(db XODB) error

Update updates the Header in the database.

type HeaderMail

type HeaderMail struct {
	ID          int64  // id
	HeaderID    int64  // header_id
	MailID      int64  // mail_id
	HeaderValue string // header_value
	// contains filtered or unexported fields
}

HeaderMail represents a row from 'header_mail'.

func HeaderMailByID

func HeaderMailByID(db XODB, id int64) (*HeaderMail, error)

HeaderMailByID retrieves a row from 'header_mail' as a HeaderMail.

Generated from index 'header_mail_id_pkey'.

func HeaderMailsByHeaderIDHeaderValue

func HeaderMailsByHeaderIDHeaderValue(db XODB, headerID int64, headerValue string) ([]*HeaderMail, error)

HeaderMailsByHeaderIDHeaderValue retrieves a row from 'header_mail' as a HeaderMail.

Generated from index 'idx_header_mail_header_id_header_value'.

func HeaderMailsByMailID

func HeaderMailsByMailID(db XODB, mailID int64) ([]*HeaderMail, error)

HeaderMailsByMailID retrieves a row from 'header_mail' as a HeaderMail.

Generated from index 'idx_header_mail_mail_id'.

func (*HeaderMail) Delete

func (hm *HeaderMail) Delete(db XODB) error

Delete deletes the HeaderMail from the database.

func (*HeaderMail) Deleted

func (hm *HeaderMail) Deleted() bool

Deleted provides information if the HeaderMail has been deleted from the database.

func (*HeaderMail) Exists

func (hm *HeaderMail) Exists() bool

Exists determines if the HeaderMail exists in the database.

func (*HeaderMail) Header

func (hm *HeaderMail) Header(db XODB) (*Header, error)

Header returns the Header associated with the HeaderMail's HeaderID (header_id).

Generated from foreign key 'header_mail_header_id_fkey'.

func (*HeaderMail) Insert

func (hm *HeaderMail) Insert(db XODB) error

Insert inserts the HeaderMail to the database.

func (*HeaderMail) MailByMailID

func (hm *HeaderMail) MailByMailID(db XODB) (*Mail, error)

MailByMailID returns the Mail associated with the HeaderMail's MailID (mail_id).

Generated from foreign key 'header_mail_mail_id_fkey'.

func (*HeaderMail) Save

func (hm *HeaderMail) Save(db XODB) error

Save saves the HeaderMail to the database.

func (*HeaderMail) Update

func (hm *HeaderMail) Update(db XODB) error

Update updates the HeaderMail in the database.

type Mail

type Mail struct {
	ID         int64  // id
	Content    string // content
	TsReceived int64  // ts_received
	// contains filtered or unexported fields
}

Mail represents a row from 'mail'.

func MailByID

func MailByID(db XODB, id int64) (*Mail, error)

MailByID retrieves a row from 'mail' as a Mail.

Generated from index 'mail_id_pkey'.

func MailsByTsReceived

func MailsByTsReceived(db XODB, tsReceived int64) ([]*Mail, error)

MailsByTsReceived retrieves a row from 'mail' as a Mail.

Generated from index 'idx_mail_ts_received'.

func (*Mail) Delete

func (m *Mail) Delete(db XODB) error

Delete deletes the Mail from the database.

func (*Mail) Deleted

func (m *Mail) Deleted() bool

Deleted provides information if the Mail has been deleted from the database.

func (*Mail) Exists

func (m *Mail) Exists() bool

Exists determines if the Mail exists in the database.

func (*Mail) Insert

func (m *Mail) Insert(db XODB) error

Insert inserts the Mail to the database.

func (*Mail) Save

func (m *Mail) Save(db XODB) error

Save saves the Mail to the database.

func (*Mail) Update

func (m *Mail) Update(db XODB) error

Update updates the Mail in the database.

type ScannerValuer

type ScannerValuer interface {
	sql.Scanner
	driver.Valuer
}

ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.

type Slice

type Slice []ScannerValuer

Slice is a slice of ScannerValuers.

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.

func (StringSlice) Value

func (ss StringSlice) Value() (driver.Value, error)

Value satisfies the driver.Valuer 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 ”.

This should work with database/sql.DB and database/sql.Tx.

Jump to

Keyboard shortcuts

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