@@ -65,14 +65,14 @@ const provider: StorageProvider = {
6565 } ) ;
6666 } ,
6767 setItem ( key , value ) {
68- return db . executeAsync ( 'REPLACE INTO keyvaluepairs (record_key, valueJSON) VALUES (?, ?);' , [ key , JSON . stringify ( value ) ] ) ;
68+ return db . executeAsync ( 'REPLACE INTO keyvaluepairs (record_key, valueJSON) VALUES (?, ?);' , [ key , JSON . stringify ( value ) ] ) . then ( ( ) => undefined ) ;
6969 } ,
7070 multiSet ( pairs ) {
7171 const stringifiedPairs = pairs . map ( ( pair ) => [ pair [ 0 ] , JSON . stringify ( pair [ 1 ] === undefined ? null : pair [ 1 ] ) ] ) ;
7272 if ( utils . isEmptyObject ( stringifiedPairs ) ) {
7373 return Promise . resolve ( ) ;
7474 }
75- return db . executeBatchAsync ( [ [ 'REPLACE INTO keyvaluepairs (record_key, valueJSON) VALUES (?, json(?));' , stringifiedPairs ] ] ) ;
75+ return db . executeBatchAsync ( [ [ 'REPLACE INTO keyvaluepairs (record_key, valueJSON) VALUES (?, json(?));' , stringifiedPairs ] ] ) . then ( ( ) => undefined ) ;
7676 } ,
7777 multiMerge ( pairs , mergeReplaceNullPatches ) {
7878 const commands : SQLBatchTuple [ ] = [ ] ;
@@ -112,7 +112,7 @@ const provider: StorageProvider = {
112112 commands . push ( [ replaceQuery , replaceQueryArguments ] ) ;
113113 }
114114
115- return db . executeBatchAsync ( commands ) ;
115+ return db . executeBatchAsync ( commands ) . then ( ( ) => undefined ) ;
116116 } ,
117117 mergeItem ( key , change ) {
118118 // Since Onyx already merged the existing value with the changes, we can just set the value directly.
@@ -124,13 +124,13 @@ const provider: StorageProvider = {
124124 const result = rows ?. _array . map ( ( row ) => row . record_key ) ;
125125 return ( result ?? [ ] ) as KeyList ;
126126 } ) ,
127- removeItem : ( key ) => db . executeAsync ( 'DELETE FROM keyvaluepairs WHERE record_key = ?;' , [ key ] ) ,
127+ removeItem : ( key ) => db . executeAsync ( 'DELETE FROM keyvaluepairs WHERE record_key = ?;' , [ key ] ) . then ( ( ) => undefined ) ,
128128 removeItems : ( keys ) => {
129129 const placeholders = keys . map ( ( ) => '?' ) . join ( ',' ) ;
130130 const query = `DELETE FROM keyvaluepairs WHERE record_key IN (${ placeholders } );` ;
131- return db . executeAsync ( query , keys ) ;
131+ return db . executeAsync ( query , keys ) . then ( ( ) => undefined ) ;
132132 } ,
133- clear : ( ) => db . executeAsync ( 'DELETE FROM keyvaluepairs;' , [ ] ) ,
133+ clear : ( ) => db . executeAsync ( 'DELETE FROM keyvaluepairs;' , [ ] ) . then ( ( ) => undefined ) ,
134134 getDatabaseSize ( ) {
135135 return Promise . all ( [ db . executeAsync ( 'PRAGMA page_size;' ) , db . executeAsync ( 'PRAGMA page_count;' ) , getFreeDiskStorage ( ) ] ) . then ( ( [ pageSizeResult , pageCountResult , bytesRemaining ] ) => {
136136 const pageSize : number = pageSizeResult . rows ?. item ( 0 ) . page_size ;
0 commit comments