mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
PostgreSQL prep
Update of vendored SQL libs and refactoring of store provider layer.
This commit is contained in:
parent
d0e005f638
commit
b455e5eaf5
105 changed files with 10949 additions and 2376 deletions
5
vendor/github.com/jmoiron/sqlx/bind.go
generated
vendored
5
vendor/github.com/jmoiron/sqlx/bind.go
generated
vendored
|
@ -21,7 +21,7 @@ const (
|
|||
// BindType returns the bindtype for a given database given a drivername.
|
||||
func BindType(driverName string) int {
|
||||
switch driverName {
|
||||
case "postgres", "pgx", "pq-timeouts":
|
||||
case "postgres", "pgx", "pq-timeouts", "cloudsqlpostgres":
|
||||
return DOLLAR
|
||||
case "mysql":
|
||||
return QUESTION
|
||||
|
@ -113,7 +113,8 @@ func In(query string, args ...interface{}) (string, []interface{}, error) {
|
|||
v := reflect.ValueOf(arg)
|
||||
t := reflectx.Deref(v.Type())
|
||||
|
||||
if t.Kind() == reflect.Slice {
|
||||
// []byte is a driver.Value type so it should not be expanded
|
||||
if t.Kind() == reflect.Slice && t != reflect.TypeOf([]byte{}) {
|
||||
meta[i].length = v.Len()
|
||||
meta[i].v = v
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue