File tree 2 files changed +8
-0
lines changed
Filter options
2 files changed +8
-0
lines changed
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ function onModuleReady(SQL) {
35
35
id : data [ "id" ] ,
36
36
results : db . exec ( data [ "sql" ] , data [ "params" ] , config )
37
37
} ) ;
38
+ case "getRowsModified" :
39
+ return postMessage ( {
40
+ id : data [ "id" ] ,
41
+ rowsModified : db . getRowsModified ( )
42
+ } ) ;
38
43
case "each" :
39
44
if ( db === null ) {
40
45
createDb ( ) ;
Original file line number Diff line number Diff line change @@ -118,6 +118,9 @@ exports.test = async function test(SQL, assert) {
118
118
assert . strictEqual ( table . values [ 2 ] [ 1 ] , 'c' , 'Reading string' ) ;
119
119
assert . deepEqual ( obj2array ( table . values [ 2 ] [ 2 ] ) , [ 0x00 , 0x44 ] , 'Reading BLOB byte' ) ;
120
120
121
+ data = await worker . postMessage ( { action : 'getRowsModified' } ) ;
122
+ assert . equal ( data . rowsModified , 1 , 'Number of changed rows' )
123
+
121
124
data = await worker . postMessage ( { action : 'export' } ) ;
122
125
var header = "SQLite format 3\0" ;
123
126
var actual = "" ;
You can’t perform that action at this time.
0 commit comments