=> cursor.value);
			}
		}

		(async () => {
			const initialSortKey = new Key();
			initialSortKey.gapKey = 1000;
			const roomId = "!abc:hs.tld";
			const storage = new Storage("mysession");
			await storage.open();

			let records = await storage.selectFirst(roomId, 15);
			if (!records.length) {
				// insert first batch backwards,
				// to see we're not assuming insertion order to sort
				let sortKey = initialSortKey.clone();
				sortKey.eventKey = 10;
				for (var i = 10; i > 0; i--) {
					await st