Versions in this module Expand all Collapse all v0 v0.0.3 May 23, 2023 v0.0.2 May 22, 2023 v0.0.1 May 19, 2023 Changes in this version + var ErrUnsupported = errors.New("sql/sqlclient: driver does not support changing connected schema") + func Register(name string, opener Opener, opts ...RegisterOption) + type Client struct + DB *sql.DB + Name string + URL *URL + func Open(ctx context.Context, s string, opts ...OpenOption) (*Client, error) + func OpenURL(ctx context.Context, u *url.URL, opts ...OpenOption) (*Client, error) + func (c *Client) AddClosers(closers ...io.Closer) + func (c *Client) Close() (err error) + func (c *Client) Tx(ctx context.Context, opts *sql.TxOptions) (*TxClient, error) + type OpenOption func(*openOptions) error + func OpenSchema(s string) OpenOption + type Opener interface + Open func(ctx context.Context, u *url.URL) (*Client, error) + func DriverOpener(open func(schema.ExecQuerier) (migrate.Driver, error)) Opener + type OpenerFunc func(context.Context, *url.URL) (*Client, error) + func (f OpenerFunc) Open(ctx context.Context, u *url.URL) (*Client, error) + type RegisterOption func(*registerOptions) + func RegisterCodec(m schemahcl.Marshaler, e schemahcl.Evaluator) RegisterOption + func RegisterDriverOpener(open func(schema.ExecQuerier) (migrate.Driver, error)) RegisterOption + func RegisterFlavours(flavours ...string) RegisterOption + func RegisterTxOpener(open TxOpener) RegisterOption + func RegisterURLParser(p URLParser) RegisterOption + type SchemaChanger interface + ChangeSchema func(*url.URL, string) *url.URL + type Tx struct + CommitFn func() error + RollbackFn func() error + func (tx *Tx) Commit() error + func (tx *Tx) Rollback() error + type TxClient struct + Tx *Tx + func (c *TxClient) Commit() error + func (c *TxClient) Rollback() error + type TxOpener func(context.Context, *sql.DB, *sql.TxOptions) (*Tx, error) + type URL struct + DSN string + Schema string + type URLParser interface + ParseURL func(*url.URL) *URL + type URLParserFunc func(*url.URL) *URL + func (f URLParserFunc) ParseURL(u *url.URL) *URL