File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,9 +107,8 @@ const provider: StorageProvider<NitroSQLiteConnection | undefined> = {
107107 throw new Error ( 'Store is not initialized!' ) ;
108108 }
109109
110- const placeholders = keys . map ( ( ) => '?' ) . join ( ',' ) ;
111- const command = `SELECT record_key, valueJSON FROM keyvaluepairs WHERE record_key IN (${ placeholders } );` ;
112- return provider . store . executeAsync < OnyxSQLiteKeyValuePair > ( command , keys ) . then ( ( { rows} ) => {
110+ const command = `SELECT kv.record_key, kv.valueJSON FROM keyvaluepairs kv INNER JOIN json_each(?) je ON kv.record_key = je.value;` ;
111+ return provider . store . executeAsync < OnyxSQLiteKeyValuePair > ( command , [ JSON . stringify ( keys ) ] ) . then ( ( { rows} ) => {
113112 // eslint-disable-next-line no-underscore-dangle
114113 const result = rows ?. _array . map ( ( row ) => [ row . record_key , JSON . parse ( row . valueJSON ) ] ) ;
115114 return ( result ?? [ ] ) as StorageKeyValuePair [ ] ;
You can’t perform that action at this time.
0 commit comments