You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version are you using? nano-sql/adapter-sqlite-cordova: 2.1.2 nano-sql/core: 2.3.7
Describe the bug
The Adapter-SQLite-Cordova package does not initialize the Automatic Increment table before creating a table which causes an error: sqlite3_prepare_v2 failure: no such table: _ai
In the connect method call, rather than calling complete following the creation of the database, there should be a second call to create the _ai table using createAI as seen in other adapters.
Which version are you using?
nano-sql/adapter-sqlite-cordova: 2.1.2
nano-sql/core: 2.3.7
Describe the bug
The
Adapter-SQLite-Cordova
package does not initialize the Automatic Increment table before creating a table which causes an error:sqlite3_prepare_v2 failure: no such table: _ai
Resolution
https://github.com/ClickSimply/Nano-SQL/blob/af74705e3fc4be6e65c0e4044f7dc7c5b745886c/packages/Adapter-SQLite-Cordova/src/index.ts#L51-L59
In the
connect
method call, rather than callingcomplete
following the creation of the database, there should be a second call to create the_ai
table usingcreateAI
as seen in other adapters.https://github.com/ClickSimply/Nano-SQL/blob/c502a60735f77dd04fa5411197a9e7604c3174f2/packages/Adapter-SQLite3/src/index.ts#L46-L57
The text was updated successfully, but these errors were encountered: