feat: insertBatchSize

This commit is contained in:
2024-04-12 18:28:50 +01:00
parent e62bb58362
commit e5c8634c59
6 changed files with 39 additions and 11 deletions

View File

@ -11,7 +11,10 @@ const workerScript = import.meta.env.DEV
const workerRelay = new WorkerRelayInterface(workerScript);
// load sqlite database and run migrations
await workerRelay.init("my-relay.db");
await workerRelay.init({
databasePath: "relay.db",
insertBatchSize: 100
});
// Query worker relay with regular nostr REQ command
const results = await workerRelay.query(["REQ", "1", { kinds: [1], limit: 10 }]);