postgres

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Unlicense Imports: 12 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

This section is empty.

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(model interface{}) error

func (Database) Insert

func (db Database) Insert(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(_ string, args interface{}) (interface{}, error)

func (Database) SyncSchema

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

func (Database) Update

func (db Database) Update(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(obj interface{}) error

func (TxMutationAdapter) Insert added in v0.4.2

func (TxMA TxMutationAdapter) Insert(obj interface{}) error

func (TxMutationAdapter) Update added in v0.4.2

func (TxMA TxMutationAdapter) Update(obj interface{}) error

Jump to

Keyboard shortcuts

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