mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
phase 2: mattes/migrate -> migratex (#848)
* move mattes migrations to migratex * changes format of migrations to migratex format * updates test runner to use new interface (double checked this with printlns, the tests go fully down and then up, and work on pg/mysql) * remove mattes/migrate * update tests from deps * update readme * fix other file extensions
This commit is contained in:
15
vendor/github.com/jmoiron/sqlx/sqlx_test.go
generated
vendored
15
vendor/github.com/jmoiron/sqlx/sqlx_test.go
generated
vendored
@@ -1387,13 +1387,17 @@ func (p PropertyMap) Value() (driver.Value, error) {
|
||||
|
||||
func (p PropertyMap) Scan(src interface{}) error {
|
||||
v := reflect.ValueOf(src)
|
||||
if !v.IsValid() || v.IsNil() {
|
||||
if !v.IsValid() || v.CanAddr() && v.IsNil() {
|
||||
return nil
|
||||
}
|
||||
if data, ok := src.([]byte); ok {
|
||||
return json.Unmarshal(data, &p)
|
||||
switch ts := src.(type) {
|
||||
case []byte:
|
||||
return json.Unmarshal(ts, &p)
|
||||
case string:
|
||||
return json.Unmarshal([]byte(ts), &p)
|
||||
default:
|
||||
return fmt.Errorf("Could not not decode type %T -> %T", src, p)
|
||||
}
|
||||
return fmt.Errorf("Could not not decode type %T -> %T", src, p)
|
||||
}
|
||||
|
||||
func TestEmbeddedMaps(t *testing.T) {
|
||||
@@ -1493,6 +1497,9 @@ func TestIn(t *testing.T) {
|
||||
{"SELECT * FROM foo WHERE x in (?)",
|
||||
[]interface{}{[]int{1, 2, 3, 4, 5, 6, 7, 8}},
|
||||
8},
|
||||
{"SELECT * FROM foo WHERE x = ? AND y in (?)",
|
||||
[]interface{}{[]byte("foo"), []int{0, 5, 3}},
|
||||
4},
|
||||
}
|
||||
for _, test := range tests {
|
||||
q, a, err := In(test.q, test.args...)
|
||||
|
||||
Reference in New Issue
Block a user