Documentation ¶
Index ¶
- func NewClient(driverName, dsn string) (*sql.DB, error)
- func SampleMainPgx(yml []byte) error
- func SampleMainStd(yml []byte, driverName string) error
- type Book
- type Postgres
- func (pg *Postgres) Acquire(ctx context.Context) (*pgxpool.Conn, error)
- func (pg *Postgres) Begin(ctx context.Context) (pgx.Tx, error)
- func (pg *Postgres) BeginReadOnly(ctx context.Context) (pgx.Tx, error)
- func (pg *Postgres) Close()
- func (pg *Postgres) CreateDatabase(ctx context.Context, dbname string) error
- func (pg *Postgres) CreateDatabaseIfNotExists(ctx context.Context, dbname string) error
- func (pg *Postgres) CreateOrReplaceDatabase(ctx context.Context, dbname string) error
- func (pg *Postgres) DropDatabase(ctx context.Context, dbname string) error
- func (pg *Postgres) DropDatabaseIfExists(ctx context.Context, dbname string) error
- func (pg *Postgres) Ping(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SampleMainPgx ¶ added in v0.4.0
func SampleMainStd ¶ added in v0.4.0
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) BeginReadOnly ¶
func (*Postgres) CreateDatabase ¶
func (*Postgres) CreateDatabaseIfNotExists ¶
func (*Postgres) CreateOrReplaceDatabase ¶
func (*Postgres) DropDatabase ¶
func (*Postgres) DropDatabaseIfExists ¶
Click to show internal directories.
Click to hide internal directories.