Documentation
¶
Overview ¶
Package postgres provides an adapter for the database abstraction layer so that you can access PostgreSQL databases
Index ¶
- type Database
- func (db Database) Close() error
- func (db Database) DataFromDatabaseUsingResolveParams(objArr interface{}, modelType reflect.Type, p graphql.ResolveParams) error
- func (db Database) Delete(model interface{}) error
- func (db Database) Insert(model interface{}) error
- func (db Database) RunInTransaction(fn database.InnerTransactionFunc) error
- func (db Database) Select(_ string, args interface{}) (interface{}, error)
- func (db Database) SyncSchema(options database.SchemaSyncOptions, models ...interface{}) error
- func (db Database) Update(model interface{}) error
- type TxMutationAdapter
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) DataFromDatabaseUsingResolveParams ¶ added in v0.3.1
func (Database) RunInTransaction ¶ added in v0.4.2
func (db Database) RunInTransaction(fn database.InnerTransactionFunc) error
func (Database) SyncSchema ¶
func (db Database) SyncSchema(options database.SchemaSyncOptions, models ...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
Click to show internal directories.
Click to hide internal directories.