I'm not 100% sure I'll complete it since I still have some open questions about it, and it definitely requires some node polyfills.
One question is how I might handle migrations. I currently have them noop'ed in knex, but I know this module have some amount of support for migrations. I wonder if and how i can leverage it.
Either way, I wanted to share it in case folks were interested. I know you've done some work to make typeorm possible, but i much prefer https://mikro-orm.io/, and it requires knex, so I thought I'd give it a go.
Describe the bug This isn't really a bug, but it's not a feature request either.
I've created preliminary support for using @capacitor-community/sqlite with http://knexjs.org/
The typing isn't great because knex doesn't expose some of their types, and none of the drivers are themselves typed.
Here's the somewhat working implementation and example usage:
https://gist.github.com/jrobeson/788bfe6b97db45aa1535bf6897681b94
I'm not 100% sure I'll complete it since I still have some open questions about it, and it definitely requires some node polyfills.
One question is how I might handle migrations. I currently have them noop'ed in knex, but I know this module have some amount of support for migrations. I wonder if and how i can leverage it.
Either way, I wanted to share it in case folks were interested. I know you've done some work to make typeorm possible, but i much prefer https://mikro-orm.io/, and it requires knex, so I thought I'd give it a go.