db

package
v0.0.0-...-aac2ae4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	pgx.ConnConfig
	Schemas   []string
	Relations SchemaRelations
	PoolSize  int
	Pool      *pgx.ConnPool
}

Database - represents Schema with Schemas

func (*Database) FetchRelations

func (d *Database) FetchRelations() error

FetchRelations - sets existing relations for database

func (*Database) Select

func (d *Database) Select(schema string, relation Relation, limit int, offset int) ([]Keyvalue, error)

Select - selects given relation with limit and offset

type Keyvalue

type Keyvalue map[string]interface{}

Keyvalue - represents {column: value} mapping, without any type-checking

type Relation

type Relation struct {
	Name       string
	Attributes []column
}

Relation - represents PostgreSQL relation

type SchemaRelations

type SchemaRelations map[string][]Relation

SchemaRelations - mapping from schema name to its relations

Jump to

Keyboard shortcuts

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