=> results.length === amount,
					(cursor) => cursor.value);
				events.reverse();
				return events;
			}

			async selectFirst(roomId, amount) {
				const tx = this._database.transaction(["timeline"], "readonly");
				const store = tx.objectStore("timeline");
				const minKey = new Key();
				const range = IDBKeyRange.lowerBound([roomId, minKey.buffer()]);
				const cursor = store.openCursor(range, "next");
				return await fetchResults(cursor, 
					(results) => results.length === amount,
					(cursor) 