Documentation ¶
Index ¶
- func NewPostgresDatastore(ctx context.Context, logger logger.Logger, user, password, host string, ...) (*PostgresDatastore, CloseFunc)
- type CloseFunc
- type Datastore
- type PostgresDatastore
- func (p *PostgresDatastore) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
- func (p *PostgresDatastore) Exec(query string, args ...any) (sql.Result, error)
- func (p *PostgresDatastore) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (p *PostgresDatastore) Prepare(query string) (*sql.Stmt, error)
- func (p *PostgresDatastore) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- func (p *PostgresDatastore) Query(query string, args ...any) (*sql.Rows, error)
- func (p *PostgresDatastore) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (p *PostgresDatastore) QueryRow(query string, args ...any) *sql.Row
- func (p *PostgresDatastore) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datastore ¶
type Datastore interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) Exec(query string, args ...any) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) Prepare(query string) (*sql.Stmt, error) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) Query(query string, args ...any) (*sql.Rows, error) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error) QueryRow(query string, args ...any) *sql.Row QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row }
type PostgresDatastore ¶
type PostgresDatastore struct {
// contains filtered or unexported fields
}
func (*PostgresDatastore) ExecContext ¶
func (*PostgresDatastore) Prepare ¶
func (p *PostgresDatastore) Prepare(query string) (*sql.Stmt, error)
func (*PostgresDatastore) PrepareContext ¶
func (*PostgresDatastore) QueryContext ¶
func (*PostgresDatastore) QueryRow ¶
func (p *PostgresDatastore) QueryRow(query string, args ...any) *sql.Row
func (*PostgresDatastore) QueryRowContext ¶
Click to show internal directories.
Click to hide internal directories.