Skip to content

Commit

Permalink
refactor: Update demo for test schemaVer
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Aug 31, 2024
1 parent bdebb58 commit 4d5038b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/engine/demo/collection.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ const alwatrStore = new AlwatrStore({
});

async function quickstart() {
/**
* @type {import('@alwatr/store-engine').StoreFileId}
*/
const postsCollectionId = {
name: 'post',
region: Region.PerUser,
ownerId: 'user_123',
schemaVer: 2,
};

logger.logProperty?.('collectionId', postsCollectionId);
Expand All @@ -36,6 +40,8 @@ async function quickstart() {
// Get a collection reference.
const postsCollection = await alwatrStore.openCollection(postsCollectionId);

logger.logProperty?.('collection.schemaVer', postsCollection.schemaVer);

const post1Id = 'intro-to-alwatr-store';
const post2Id = 'intro-to-alwatr-collections';

Expand Down

0 comments on commit 4d5038b

Please sign in to comment.