@@ -239,14 +239,14 @@ export async function makeSQLKernelDatabase({
239239 *
240240 * @returns the vatstore contents as a key-value Map.
241241 */
242- function getKVData ( ) : Map < string , string > {
243- const result = new Map < string , string > ( ) ;
242+ function getKVData ( ) : Record < string , string > {
243+ const result : Record < string , string > = { } ;
244244 sqlVatstoreGetAll . bind ( [ vatID ] ) ;
245245 try {
246246 while ( sqlVatstoreGetAll . step ( ) ) {
247247 const key = sqlVatstoreGetAll . getString ( 0 ) as string ;
248248 const value = sqlVatstoreGetAll . getString ( 1 ) as string ;
249- result . set ( key , value ) ;
249+ result [ key ] = value ;
250250 }
251251 } finally {
252252 sqlVatstoreGetAll . reset ( ) ;
@@ -261,18 +261,18 @@ export async function makeSQLKernelDatabase({
261261 * @param deletes - A set of keys that have been deleted.
262262 */
263263 function updateKVData (
264- sets : Map < string , string > ,
265- deletes : Set < string > ,
264+ sets : Record < string , string > ,
265+ deletes : string [ ] ,
266266 ) : void {
267267 try {
268268 sqlBeginTransaction . step ( ) ;
269269 sqlBeginTransaction . reset ( ) ;
270- for ( const [ key , value ] of sets . entries ( ) ) {
270+ for ( const [ key , value ] of Object . entries ( sets ) ) {
271271 sqlVatstoreSet . bind ( [ vatID , key , value ] ) ;
272272 sqlVatstoreSet . step ( ) ;
273273 sqlVatstoreSet . reset ( ) ;
274274 }
275- for ( const value of deletes . values ( ) ) {
275+ for ( const value of deletes ) {
276276 sqlVatstoreDelete . bind ( [ vatID , value ] ) ;
277277 sqlVatstoreDelete . step ( ) ;
278278 sqlVatstoreDelete . reset ( ) ;
0 commit comments