-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
@@ -0,0 +1,49 @@ | |||
import { Column, ColumnType, Index, IndexedColumn, Schema, Table } from '@journeyapps/powersync-sdk-web'; | |||
|
|||
// TODO move this to a shared NPM package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if putting this into a package makes sense. I think we should rather look into composable demos, similar to how expo
examples templates work:
npx @journeyapps/powersync-create-app --templates "ts-todolist-app" "ts-with-attachments"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I updated the comment for future investigation
packages/powersync-sdk-web/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.ts
Outdated
Show resolved
Hide resolved
const sqlite3 = SQLite.Factory(module); | ||
|
||
// @ts-ignore | ||
const { IDBMinimalVFS } = await import('@journeyapps/wa-sqlite/src/examples/IDBMinimalVFS.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IDBBatchAtomicVFS is much faster than this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one seems to cause a corrupted DB error to occur. I will add this to the list of future items to investigate for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know there were some major db corruption issues related to that, fixed in SQLite 3.44.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that! I updated the wa-sqlite build to use SQLite 3.44 and applied the fixes from the PR in the linked issue. This now uses IDBBatchAtomicVFS
…DK common (dev package) for crud retry bug.
…kage dependencies to prod packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the demo: Looks good overall, but didn't check the details.
For a next iteration, it would be good to convert it to a PWA (basically just add a service worker and manifest), so that it can work fully offline.
For the database implementation: Looks good, don't see any issues.
This PR introduces the initial Alpha implementation of the PowerSync Web SDK.
The Alpha release is very much still Alpha.
High level features include:
Future work not included in this PR:
TODOs
public
Related PRs powersync-ja/wa-sqlite#1
Some nice screenshots of Demo App follow