iandis / isolated_worker

An isolated worker for Flutter (Isolate) and Web (Web Worker). Behaves almost the same as the compute function, except it is not a one-off worker.
MIT License
41 stars 11 forks source link

DB operation using moor within JsIsolatedWorker #6

Closed KiraKmp closed 3 years ago

KiraKmp commented 3 years ago

Hi, i am using moor for DB in my application, is it possible to use moor DB connection within JsIsolatedWorker, any alternate ways to establish DB connection in JsIsolatedWorker.

iandis commented 3 years ago

Hi, though I haven't used Moor for DB related things, but at a first glance I think it's possible since it depends on a native JS library (sql.js) which is compatible with JsIsolatedWorker. However for now I'm not really sure, so I might be trying it this weekend.

KiraKmp commented 3 years ago

Thank you for your fast reply and trying it out, It would be great if we can get this done, which would add more value to this package.

iandis commented 3 years ago

Hi, if you're curious about the progress, check out my template repo here It's currently at the stage of trying to find a workaround for Prepared Statements as it is used by operations like select and batch. Thank you.

iandis commented 3 years ago

Closing this as the example of moor web + JsIsolatedWorker is answered