jet/sqlbuilder/statement.go

15 lines
311 B
Go
Raw Normal View History

package sqlbuilder
import (
"database/sql"
2019-04-20 19:49:29 +02:00
"github.com/sub0zero/go-sqlbuilder/types"
)
2019-05-07 19:06:21 +02:00
type statement interface {
// String returns generated SQL as string.
Sql() (query string, args []interface{}, err error)
2019-04-20 19:49:29 +02:00
Query(db types.Db, destination interface{}) error
Execute(db types.Db) (sql.Result, error)
}