您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }