Closed DawidWetzler closed 7 months ago
Hello there, thanks for your feedback.
It should work for all the platforms this plugin supports.
I've though about calling it kysely-capacitor-sqlite
but also had questions like following in my head
Q: How would I look after a extension of capacitor sqlite?
A: capacitor sqlite querybuilder
A: capacitor sqlite with kysely
A: kysely capacitor sqlite
R: capacitor-sqlite-kysely
Q: What's actually using what?
A: Kysely uses capacitor sqlite to make it work within capacitor projects.
R: kysely-capacitor-sqlite
Q: This is extension of whose functionalities?
A: Capacitor Sqlite
R: capacitor-sqlite-kysely
Q: Can I still use capacitor-sqlite outside kysely?
A: Definitely. Also shown in the example.
R: capacitor-sqlite-kysely
and for the reasons I decided to go with capacitor-sqlite-kysely
but if you think this might be confusing I'm open to republish this as kysely-capacitor-sqlite
or kysely-driver-capacitor-sqlite
as I haven't done a pull request on the kysely repository itself for now.
That's true. I could've done a more proper handling of this than just try catching it. I'll note this down and look into this in the next few days.
Thanks for catching this!
@DawidWetzler may be you should open a PR to kysely as it is a driver for kysely this is how it was made for typeOrm. Try to clarify with them if you can do it that way.
Hey @jepiqueau, the issues you've found out are now fixed and the docs also now include the driver.
@DawidWetzler can you share this as the link given earlier does not show it or has not been updated
I'm not sure about which link you're talking about but
and the rest
@DawidWetzler i was looking on npm for kysely-capacitor-sqlite or even better kysely-driver-capacitor-sqlite and did not find it it is still called capacitor-sqlite-kysely which is not a correct naming according to the Capacitor team as it is not a capacitor plugin so you must rename it on npm. For the rest i saw what you did which is OK
Could you please provide me the source for this? If there's this written somewhere I'd like to include this in the current repo as I have to admit I will be really unhappy with this because of:
@DawidWetzler Thanks for your contribution. i have few questions or remarks.
is this working only for Web or also for Native App
it is a bit confusing to have call this
capacitor-sqlite-kysely
as it is not a capacitor plugin so this is confusing. it is more a driver or wrapper. Would be better to rename itkysely-capacitor-sqlite-driver
this.#sqlite.saveToStore(this.#config.name)
is only valid for Web platform. You may add @capacitor/core as dependency,import { Capacitor } from '@capacitor/core';
and get the platformconst platform = Capacitor.getPlatform();
doing so you can test for the platform and not throw an error in nativefor the
beginTransaction
,commitTransaction
,rollbackTransaction
method you must use the newdb.beginTransaction, ...
of the@capacitor-community-sqlite
pluginApart from this, i am sure that your contribution will be greatly appreciated by the community, thanks for this