postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package postgres implements the target storage interface backed by PostgreSQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a PostgreSQL client.

func NewClient

func NewClient(connString string, l *log.Logger) (*Client, error)

NewClient creates a new PostgreSQL client.

func (*Client) Name

func (c *Client) Name() string

Name returns the name of the PostgreSQL client.

func (*Client) Query

func (c *Client) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)

Query submits a new query to PostgreSQL.

func (*Client) QueryRow

func (c *Client) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row

QueryRow submits a new query for a single row to PostgreSQL.

func (*Client) SendBatch

func (c *Client) SendBatch(ctx context.Context, batch *pgx.Batch) error

SendBatch submits a new transaction batch to PostgreSQL.

func (*Client) Shutdown

func (c *Client) Shutdown()

Shutdown shuts down the target storage client.

Jump to

Keyboard shortcuts

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