Documentation ¶
Overview ¶
Package postgres wraps postgres (pq) driver as an adapter for REL.
Usage:
// open postgres connection. adapter, err := postgres.Open("postgres://postgres@localhost/rel_test?sslmode=disable") if err != nil { panic(err) } defer adapter.Close() // initialize REL's repo. repo := rel.New(adapter)
Index ¶
- type Adapter
- func (adapter *Adapter) Begin(ctx context.Context) (rel.Adapter, error)
- func (adapter *Adapter) Insert(ctx context.Context, query rel.Query, mutates map[string]rel.Mutate) (interface{}, error)
- func (adapter *Adapter) InsertAll(ctx context.Context, query rel.Query, fields []string, ...) ([]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.