Documentation ¶
Index ¶
- func New(_ context.Context, connectionString string, config ksql.Config) (ksql.DB, error)
- func NewFromSQLDB(db *sql.DB) (ksql.DB, error)
- type SQLAdapter
- func (s SQLAdapter) BeginTx(ctx context.Context) (ksql.Tx, error)
- func (s SQLAdapter) Close() error
- func (s SQLAdapter) ExecContext(ctx context.Context, query string, args ...interface{}) (ksql.Result, error)
- func (s SQLAdapter) QueryContext(ctx context.Context, query string, args ...interface{}) (ksql.Rows, error)
- type SQLRows
- type SQLTx
- func (s SQLTx) Commit(ctx context.Context) error
- func (s SQLTx) ExecContext(ctx context.Context, query string, args ...interface{}) (ksql.Result, error)
- func (s SQLTx) QueryContext(ctx context.Context, query string, args ...interface{}) (ksql.Rows, error)
- func (s SQLTx) Rollback(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQLAdapter ¶
SQLAdapter adapts the sql.DB type to be compatible with the `DBAdapter` interface
func NewSQLAdapter ¶
func NewSQLAdapter(db *sql.DB) SQLAdapter
NewSQLAdapter returns a new instance of SQLAdapter with the provided database instance.
func (SQLAdapter) Close ¶
func (s SQLAdapter) Close() error
Close implements the io.Closer interface
func (SQLAdapter) ExecContext ¶
func (s SQLAdapter) ExecContext(ctx context.Context, query string, args ...interface{}) (ksql.Result, error)
ExecContext implements the DBAdapter interface
func (SQLAdapter) QueryContext ¶
func (s SQLAdapter) QueryContext(ctx context.Context, query string, args ...interface{}) (ksql.Rows, error)
QueryContext implements the DBAdapter interface
type SQLRows ¶
SQLRows implements the ksql.Rows interface and is used to help the SQLAdapter to implement the ksql.DBAdapter interface.
type SQLTx ¶
SQLTx is used to implement the DBAdapter interface and implements the Tx interface
func (SQLTx) ExecContext ¶
func (s SQLTx) ExecContext(ctx context.Context, query string, args ...interface{}) (ksql.Result, error)
ExecContext implements the Tx interface
Click to show internal directories.
Click to hide internal directories.