You need documentation and/or comments in your code or developers will end up using other projects.
I've been digging through the code base and cannot find anything related to
, or even
Here is where I've gotten.
SQLiteConnection connection = new SQLiteConnection ("errr.db");
SQLiteStatement statement = connection.Prepare ("Select * from ok");
It would be nice to execute that statement, even though I am expecting it to fail because the database doesn't exist and it is undocumented if opening a connection will create the database if it doesn't exist. If it does create a database, it should still fail
because I am unable to figure out how to insert records, so that
table doesn't exist anyways.
Jul 18, 2014 at 1:43 PM
The API provided with this package mimics the
In order to execute a statement, once prepared, you would call Step() on it. If its a non-query statement, and everything is fine, it should return SQLiteResult.DONE status; if it's a query statement, you should get a SQLiteResult.ROW status, and be able to
read the results from the statement ( operator), then you can keep calling step to read the following rows, until you no longer get SQLiteResult.ROW status.
When you create a new SQLiteConnection, if the db file doesn't exist, it creates it. If it's a relative path (just the filename), it picks an appropriate directory depending on the platform (CurrentDirectory in Net45, ApplicationData.Current.LocalFolder.Path
in Universal apps).
If you download the source code for this package, you'll find plenty examples of use in the test projects.