Documentation
¶
Index ¶
- type Client
- func (c *Client) Begin() (*Transaction, error)
- func (c *Client) Close() error
- func (c *Client) Exec(chk, stmt string, args map[string]any) error
- func (c *Client) Query(stmt string, args map[string]any) *Row
- func (c *Client) QueryAny(dst any, stmt string, args map[string]any) error
- func (c *Client) Transaction(fn func(*Transaction) error) error
- func (c *Client) WithLog(fn func(kvs ...any) error) *Client
- type Row
- type Transaction
- func (t *Transaction) Commit() error
- func (t *Transaction) Exec(chk string, stmt string, args map[string]any) error
- func (t *Transaction) Query(stmt string, args map[string]any) *Row
- func (t *Transaction) QueryAny(dst any, stmt string, args map[string]any) error
- func (t *Transaction) Rollback() error
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
}
func (*Client) Begin ¶
func (c *Client) Begin() (*Transaction, error)
func (*Client) Transaction ¶
func (c *Client) Transaction(fn func(*Transaction) error) error
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Commit ¶
func (t *Transaction) Commit() error
func (*Transaction) Rollback ¶
func (t *Transaction) Rollback() error
Click to show internal directories.
Click to hide internal directories.