Documentation ¶
Overview ¶
Package postgres wraps postgres (pq) driver as an adapter for grimoire.
Usage:
// open postgres connection. adapter, err := postgres.Open("postgres://postgres@localhost/grimoire_test?sslmode=disable") if err != nil { panic(err) } defer adapter.Close() // initialize grimoire's repo. repo := grimoire.New(adapter)
Index ¶
- type Adapter
- func (adapter *Adapter) Begin() (grimoire.Adapter, error)
- func (adapter *Adapter) Insert(query grimoire.Query, changes map[string]interface{}, ...) (interface{}, error)
- func (adapter *Adapter) InsertAll(query grimoire.Query, fields []string, allchanges []map[string]interface{}, ...) ([]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
Adapter definition for postgrees database.
Click to show internal directories.
Click to hide internal directories.