OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
549 stars 36 forks source link

[Bug]: SyncInterval parameter should be mandatory or have a default value with the openSync method #170

Closed leoalves closed 1 hour ago

leoalves commented 3 hours ago

What happened?

When trying to create the clent with the openSync libsql method without passing the syncInterval parameter, the app crashes.

When passing it all works as expected.

This value should be either mandatory or have a default value.

Thanks,

op-sqlite version

lbsql:true in package.json

React Native version

Expo SDK 51

Reproducible Example

If needed I can create one

ospfranco commented 2 hours ago

Ah, interesting, didn't realize a value was needed or maybe something changed on the last versions of libsql.

@haaawk what would be a good default value? Or should the developer always pass a value?

haaawk commented 2 hours ago

It seems to have default of 0.0 in libsql JS client @ospfranco https://github.com/tursodatabase/libsql-js/blob/f941c5dd139f22ea9a297fb0a87b2b1362a1f9c2/promise.js#L81

ospfranco commented 2 hours ago

then 0.0 it is, I'll release a new version shortly