Documentation
¶
Overview ¶
Package postgres contains an SQL projection driver for PostgreSQL.
Index ¶
- func CreateSchema(ctx context.Context, db *sql.DB) error
- func DropSchema(ctx context.Context, db *sql.DB) error
- func IsCompatibleWith(db *sql.DB) bool
- type Driver
- func (*Driver) DeleteResource(ctx context.Context, db *sql.DB, h string, r []byte) error
- func (*Driver) QueryVersion(ctx context.Context, db *sql.DB, h string, r []byte) ([]byte, error)
- func (*Driver) StoreVersion(ctx context.Context, db *sql.DB, h string, r, v []byte) error
- func (*Driver) UpdateVersion(ctx context.Context, tx *sql.Tx, h string, r, c, n []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSchema ¶
CreateSchema creates the schema elements required by the PostgreSQL driver.
func DropSchema ¶
DropSchema drops the schema elements required by the PostgreSQL driver.
func IsCompatibleWith ¶ added in v0.3.0
IsCompatibleWith returns true if the driver implemented in this package is compatible with the given database pool.
Types ¶
type Driver ¶
type Driver struct{}
Driver is an implementation of sql.Driver for PostgreSQL.
func (*Driver) DeleteResource ¶
DeleteResource removes the version for a specific handler and resource.
func (*Driver) QueryVersion ¶
QueryVersion returns the version for a specific handler and resource.
func (*Driver) StoreVersion ¶ added in v0.3.2
StoreVersion unconditionally updates the version for a specific handler and resource.
v must be non-empty, to set an empty version, use DeleteResource().