@@ -371,7 +371,7 @@ func TestBuildDMLDeleteQuery(t *testing.T) {
371
371
((name = ?) and (position = ?))
372
372
`
373
373
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
374
- test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{[] byte ( "testname" ) , 17 }))
374
+ test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{"testname" , 17 }))
375
375
}
376
376
{
377
377
uniqueKeyColumns := NewColumnList ([]string {"position" , "name" })
@@ -386,7 +386,7 @@ func TestBuildDMLDeleteQuery(t *testing.T) {
386
386
((position = ?) and (name = ?))
387
387
`
388
388
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
389
- test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{17 , [] byte ( "testname" ) }))
389
+ test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{17 , "testname" }))
390
390
}
391
391
{
392
392
uniqueKeyColumns := NewColumnList ([]string {"position" , "name" })
@@ -452,7 +452,7 @@ func TestBuildDMLInsertQuery(t *testing.T) {
452
452
(?, ?, ?, ?)
453
453
`
454
454
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
455
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , 17 , 23 }))
455
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , 17 , 23 }))
456
456
}
457
457
{
458
458
sharedColumns := NewColumnList ([]string {"position" , "name" , "age" , "id" })
@@ -466,7 +466,7 @@ func TestBuildDMLInsertQuery(t *testing.T) {
466
466
(?, ?, ?, ?)
467
467
`
468
468
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
469
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{17 , [] byte ( "testname" ) , 23 , 3 }))
469
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{17 , "testname" , 23 , 3 }))
470
470
}
471
471
{
472
472
sharedColumns := NewColumnList ([]string {"position" , "name" , "surprise" , "id" })
@@ -499,7 +499,7 @@ func TestBuildDMLInsertQuerySignedUnsigned(t *testing.T) {
499
499
(?, ?, ?, ?)
500
500
`
501
501
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
502
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , int8 (- 1 ), 23 }))
502
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , int8 (- 1 ), 23 }))
503
503
}
504
504
{
505
505
// testing unsigned
@@ -515,7 +515,7 @@ func TestBuildDMLInsertQuerySignedUnsigned(t *testing.T) {
515
515
(?, ?, ?, ?)
516
516
`
517
517
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
518
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , uint8 (255 ), 23 }))
518
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , uint8 (255 ), 23 }))
519
519
}
520
520
{
521
521
// testing unsigned
@@ -531,7 +531,7 @@ func TestBuildDMLInsertQuerySignedUnsigned(t *testing.T) {
531
531
(?, ?, ?, ?)
532
532
`
533
533
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
534
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , uint32 (4294967295 ), 23 }))
534
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , uint32 (4294967295 ), 23 }))
535
535
}
536
536
}
537
537
@@ -554,7 +554,7 @@ func TestBuildDMLUpdateQuery(t *testing.T) {
554
554
((position = ?))
555
555
`
556
556
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
557
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , 17 , 23 }))
557
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , 17 , 23 }))
558
558
test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{17 }))
559
559
}
560
560
{
@@ -570,8 +570,8 @@ func TestBuildDMLUpdateQuery(t *testing.T) {
570
570
((position = ?) and (name = ?))
571
571
`
572
572
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
573
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , 17 , 23 }))
574
- test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{17 , [] byte ( "testname" ) }))
573
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , 17 , 23 }))
574
+ test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{17 , "testname" }))
575
575
}
576
576
{
577
577
sharedColumns := NewColumnList ([]string {"id" , "name" , "position" , "age" })
@@ -586,7 +586,7 @@ func TestBuildDMLUpdateQuery(t *testing.T) {
586
586
((age = ?))
587
587
`
588
588
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
589
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , 17 , 23 }))
589
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , 17 , 23 }))
590
590
test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{56 }))
591
591
}
592
592
{
@@ -602,8 +602,8 @@ func TestBuildDMLUpdateQuery(t *testing.T) {
602
602
((age = ?) and (position = ?) and (id = ?) and (name = ?))
603
603
`
604
604
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
605
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , 17 , 23 }))
606
- test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{56 , 17 , 3 , [] byte ( "testname" ) }))
605
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , 17 , 23 }))
606
+ test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{56 , 17 , 3 , "testname" }))
607
607
}
608
608
{
609
609
sharedColumns := NewColumnList ([]string {"id" , "name" , "position" , "age" })
@@ -631,7 +631,7 @@ func TestBuildDMLUpdateQuery(t *testing.T) {
631
631
((id = ?))
632
632
`
633
633
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
634
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , 17 , 23 }))
634
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , 17 , 23 }))
635
635
test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{3 }))
636
636
}
637
637
}
@@ -656,7 +656,7 @@ func TestBuildDMLUpdateQuerySignedUnsigned(t *testing.T) {
656
656
((position = ?))
657
657
`
658
658
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
659
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , int8 (- 17 ), int8 (- 2 )}))
659
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , int8 (- 17 ), int8 (- 2 )}))
660
660
test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{int8 (- 3 )}))
661
661
}
662
662
{
@@ -673,7 +673,7 @@ func TestBuildDMLUpdateQuerySignedUnsigned(t *testing.T) {
673
673
((position = ?))
674
674
`
675
675
test .S (t ).ExpectEquals (normalizeQuery (query ), normalizeQuery (expected ))
676
- test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , [] byte ( "testname" ) , int8 (- 17 ), uint8 (254 )}))
676
+ test .S (t ).ExpectTrue (reflect .DeepEqual (sharedArgs , []interface {}{3 , "testname" , int8 (- 17 ), uint8 (254 )}))
677
677
test .S (t ).ExpectTrue (reflect .DeepEqual (uniqueKeyArgs , []interface {}{uint8 (253 )}))
678
678
}
679
679
}
0 commit comments