Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Query ¶
func Query(context context.Context, db DB, query string, args []interface{}, destinationPtr interface{}) error
Query executes query with arguments over database connection with context and stores result into destination. Destination can be either pointer to struct or pointer to slice of structs.
Types ¶
type DB ¶
type DB interface { Exec(query string, args ...interface{}) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) }
DB is common database interface used by jet execution
Click to show internal directories.
Click to hide internal directories.