storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.15k stars 715 forks source link

Windows: Cannot find an implementation of member function statement.close() #660

Open convey-gilbert opened 7 years ago

convey-gilbert commented 7 years ago

Please, can you explain the functionality of this code snippet:

94 close: function () { 95 this.statement.close(); 96 }, in Cordova-sqlite-storage / src / windows / SQLite3-Win-RT / SQLite3JS / js / SQLite3.js

I can't find a member function Close() in the Statement class in Cordova-sqlite-storage / src / windows / SQLite3-Win-RT / SQLite3 / Statement.h

brodycj commented 7 years ago

For some reason the objects exposed by the Windows have a builtin close function. After I added Database::close() I had to rename it to Database::closedb() to avoid the conflict.

Unfortunately I don't know how to explain it any deeper.

convey-gilbert commented 7 years ago

Yes, you're right: sqlite3 I can see that ILDASM shows that the classes exported via WinMD are extended by Close() members, so I'm right that has no functionality in underlying SQLite code?! It's only about releasing the interface object.

I'm involved in extending the SQLite plugin for automatic detection of repeated statements to support prepared statements in those cases (e.g. repeated INSERT statements). Since I've detected that "Close" member function on the Windows platform I only want to clarify the sense of it before porting the code.