Documentation ¶
Index ¶
- Variables
- type Entity
- type EntityHandler
- type JSONB
- type Result
- type ResultHandler
- type Session
- func (s *Session) Create(entity Entity) error
- func (s *Session) Delete(entity Entity) error
- func (s *Session) Exec(query string, args ...interface{}) (sql.Result, error)
- func (s *Session) FindAll(entity Entity, where string, whereParams ...interface{}) ([]Entity, error)
- func (s *Session) FindOne(entity Entity, where string, whereParams ...interface{}) (Entity, error)
- func (s *Session) Query(result Result, sql string, params ...interface{}) ([]Result, error)
- func (s *Session) Tx() (*Tx, error)
- func (s *Session) Update(entity Entity) error
- type Tx
- func (t *Tx) Commit() error
- func (t *Tx) Create(entity Entity) error
- func (t *Tx) Delete(entity Entity) error
- func (t *Tx) Exec(query string, args ...interface{}) (sql.Result, error)
- func (t *Tx) FindAll(entity Entity, where string, whereParams ...interface{}) ([]Entity, error)
- func (t *Tx) FindOne(entity Entity, where string, whereParams ...interface{}) (Entity, error)
- func (t *Tx) Query(result Result, sql string, params ...interface{}) ([]Result, error)
- func (t *Tx) Rollback() error
- func (t *Tx) Update(entity Entity) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERecordNotFound = errors.New("Record not found") EMultipleResults = errors.New("Unexpected multiple results from query") )
Functions ¶
This section is empty.
Types ¶
type EntityHandler ¶
type JSONB ¶
func (*JSONB) MarshalJSON ¶
MarshalJSON implements the `json.Marshaller` interface
func (*JSONB) UnmarshalJSON ¶
UnmarshalJSON implements the `json.Unmarshaler` interface
type ResultHandler ¶
type Session ¶
Session implements the EntityHandler and the ResultHandler interface
func NewSession ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.