Add support for INSERT statements.

This commit is contained in:
zer0sub 2019-04-07 09:58:12 +02:00
parent d84deb8745
commit 599a8c537a
15 changed files with 586 additions and 277 deletions

View file

@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"github.com/serenize/snaker"
"github.com/sub0Zero/go-sqlbuilder/types"
"reflect"
"regexp"
"strconv"
@ -13,7 +14,7 @@ import (
"time"
)
func Execute(db *sql.DB, query string, destinationPtr interface{}) error {
func Execute(db types.Db, query string, destinationPtr interface{}) error {
if db == nil {
return errors.New("db is nil")
}