File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1062,6 +1062,26 @@ describe('dedicated db test suite - in-memory', function () {
1062
1062
} ) ;
1063
1063
} ) ;
1064
1064
1065
+ it ( 'issue #43 - nulls and strings in arrays' , function ( ) {
1066
+ var create = 'CREATE TABLE table1 (text1 string, text2 string)' ;
1067
+ var insert = 'INSERT INTO table1 VALUES ("1337", "1337")' ;
1068
+ var update = 'UPDATE table1 SET text1=? WHERE text2=?' ;
1069
+ var select = 'SELECT * from table1;' ;
1070
+ return transactionPromise ( db , create ) . then ( function ( ) {
1071
+ return transactionPromise ( db , insert ) ;
1072
+ } ) . then ( function ( ) {
1073
+ return transactionPromise ( db , update , [ null , 1337 ] ) ;
1074
+ } ) . then ( function ( ) {
1075
+ return transactionPromise ( db , select ) ;
1076
+ } ) . then ( function ( res ) {
1077
+ assert . equal ( res . rows . length , 1 , 'rows.length' ) ;
1078
+ assert . deepEqual ( res . rows . item ( 0 ) , {
1079
+ text1 : null ,
1080
+ text2 : '1337'
1081
+ } ) ;
1082
+ } ) ;
1083
+ } ) ;
1084
+
1065
1085
it ( 'valid read transaction' , function ( ) {
1066
1086
var sql = 'CREATE TABLE table1 (text1 string, text2 string)' ;
1067
1087
return transactionPromise ( db , sql ) . then ( function ( ) {
You can’t perform that action at this time.
0 commit comments