database

package
v0.0.0-...-b0f4c4c Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectOption

type ConnectOption func(*r.ConnectOpts)

func WithAddress

func WithAddress(host string, port int) ConnectOption

func WithCredentials

func WithCredentials(username string, password string) ConnectOption

func WithName

func WithName(name string) ConnectOption

type Rethink

type Rethink struct {
	*r.Session
	// contains filtered or unexported fields
}

func New

func New(options ...ConnectOption) *Rethink

func (*Rethink) Changes

func (db *Rethink) Changes(table string) (*r.Cursor, error)

func (*Rethink) Connect

func (db *Rethink) Connect() error

func (*Rethink) CreateDatabase

func (db *Rethink) CreateDatabase(name string) error

func (*Rethink) CreateTable

func (db *Rethink) CreateTable(name string) error

func (*Rethink) Delete

func (db *Rethink) Delete(table string, id string) error

func (*Rethink) Disconnect

func (db *Rethink) Disconnect() error

func (*Rethink) DropDatabase

func (db *Rethink) DropDatabase(name string) error

func (*Rethink) DropTable

func (db *Rethink) DropTable(name string) error

func (*Rethink) FetchOne

func (db *Rethink) FetchOne(table string, value interface{}) error

func (*Rethink) Filter

func (db *Rethink) Filter(table string, filterFunc interface{}) (*r.Cursor, error)

func (*Rethink) Get

func (db *Rethink) Get(table string, id string, value interface{}) error

func (*Rethink) GetCursor

func (db *Rethink) GetCursor(table string) (*r.Cursor, error)

func (*Rethink) Insert

func (db *Rethink) Insert(table string, document interface{}) (string, error)

func (*Rethink) ListTable

func (db *Rethink) ListTable(name string, value interface{}) error

func (*Rethink) SetTags

func (db *Rethink) SetTags(tags ...string)

func (*Rethink) Update

func (db *Rethink) Update(table string, id string, value interface{}) error

Jump to

Keyboard shortcuts

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