postgres

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Unlicense Imports: 14 Imported by: 0

Documentation

Overview

Package postgres provides an adapter for the database abstraction layer so that you can access PostgreSQL databases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToPgString added in v0.5.1

func ToPgString(str string) string

Types

type Database

type Database struct {
	PgDB *pg.DB
}

func (Database) Close

func (db Database) Close() error

func (Database) DataFromDatabaseUsingResolveParams added in v0.3.1

func (db Database) DataFromDatabaseUsingResolveParams(
	objArr interface{},
	modelType reflect.Type,
	p graphql.ResolveParams) error

func (Database) Delete

func (db Database) Delete(cn string, model interface{}) error

func (Database) Insert

func (db Database) Insert(cn string, model interface{}) error

func (Database) RunInTransaction added in v0.4.2

func (db Database) RunInTransaction(fn database.InnerTransactionFunc) error

func (Database) Select added in v0.4.0

func (db Database) Select(collectionName string, args interface{}) (interface{}, error)

func (Database) SelectAdvanced added in v0.5.1

func (db Database) SelectAdvanced(collectionName string, model interface{}, query *database.SelectQuery) error

func (Database) SelectInto added in v0.5.1

func (db Database) SelectInto(collectionName string, args interface{}, model interface{}) error

func (Database) SyncSchema

func (db Database) SyncSchema(options database.SchemaSyncOptions, models ...interface{}) error

func (Database) Update

func (db Database) Update(cn string, model interface{}) error

type TxMutationAdapter added in v0.4.2

type TxMutationAdapter struct {
	// contains filtered or unexported fields
}

func (TxMutationAdapter) Delete added in v0.4.2

func (TxMA TxMutationAdapter) Delete(cn string, obj interface{}) error

func (TxMutationAdapter) Insert added in v0.4.2

func (TxMA TxMutationAdapter) Insert(cn string, obj interface{}) error

func (TxMutationAdapter) Update added in v0.4.2

func (TxMA TxMutationAdapter) Update(cn string, obj interface{}) error

Jump to

Keyboard shortcuts

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