You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

interface.go 516B

12345678910111213141516171819202122
  1. package core
  2. import (
  3. "context"
  4. "database/sql"
  5. )
  6. // Queryer represents an interface to query a SQL to get data from database
  7. type Queryer interface {
  8. QueryContext(ctx context.Context, query string, args ...interface{}) (*Rows, error)
  9. }
  10. // Executer represents an interface to execute a SQL
  11. type Executer interface {
  12. ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
  13. }
  14. // QueryExecuter combines the Queryer and Executer
  15. type QueryExecuter interface {
  16. Queryer
  17. Executer
  18. }