Documentation ¶
Overview ¶
Package client provides types and utilities used for interacting with a remote database.
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateDatabase(ctx context.Context, name string) (*sql.Result, error)
- func (c *Client) DropDatabase(ctx context.Context, name string) (*sql.Result, error)
- func (c *Client) Execute(ctx context.Context, query string) (sql.Result, error)
- func (c *Client) LastMigration(ctx context.Context) (*Migration, error)
- func (c *Client) RegisterMigration(ctx context.Context, migration *Migration) error
- func (c *Client) String() string
- type Config
- type Migration
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 defines a database client.
func (*Client) CreateDatabase ¶
CreateDatabase creates new database with the provided parameters.
func (*Client) DropDatabase ¶
DropDatabase drops database mathing the provided parameters.
func (*Client) LastMigration ¶
LastMigration retrieves the last successfully applied migration name.
func (*Client) RegisterMigration ¶
RegisterMigration registers migration as applied on a remote PostgreSQL endpoint.
Click to show internal directories.
Click to hide internal directories.