internal

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PostgresVersionKey is the query's store key used to set the postgres server version.
	PostgresVersionKey = pgversion{}
	// IncrementorKey is the scope's context key used to save current incrementor value.
	IncrementorKey = incrementorKey{}
)

Functions

func RepositoryConfig

func RepositoryConfig(cfg *config.Repository) (cfgDB pgx.ConnPoolConfig, err error)

RepositoryConfig gets the *ConfigDB based on the config.ModelConfig.

Types

type Connection

type Connection interface {
	Exec(query string, args ...interface{}) (pgx.CommandTag, error)
	ExecEx(ctx context.Context, query string, opts *pgx.QueryExOptions, args ...interface{}) (pgx.CommandTag, error)

	Query(query string, vals ...interface{}) (*pgx.Rows, error)
	QueryEx(ctx context.Context, query string, opts *pgx.QueryExOptions, args ...interface{}) (*pgx.Rows, error)

	QueryRow(query string, vals ...interface{}) *pgx.Row
	QueryRowEx(ctx context.Context, query string, opts *pgx.QueryExOptions, args ...interface{}) *pgx.Row
}

Connection is the inteface for the connection.

Jump to

Keyboard shortcuts

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