Documentation ¶
Overview ¶
Package postgres provides functions for interacting with postgres-compatible databases and includes migration scripts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
Open a connection to the database instance described in the URL, performing migrations on success.
func WithinReadOnlyTransaction ¶
WithinReadOnlyTransaction invokes the TransactionFunc, providing it an sql.Tx transaction to perform SQL operations against. If the TransactionFunc returns a non-nil error, the transaction is rolled back. Otherwise, it is committed. If the transaction is intended to include write operations, use WithinTransaction.
func WithinTransaction ¶
WithinTransaction invokes the TransactionFunc, providing it an sql.Tx transaction to perform SQL operations against. If the TransactionFunc returns a non-nil error, the transaction is rolled back. Otherwise, it is committed. If the transaction is intended to be read-only, use WithinReadOnlyTransaction.