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