Just a hint, if you want to know how to use the library

Aug 8, 2014 at 11:03 AM
Just take a look at the code, especially the tests. It's simple as that.
Sep 5, 2014 at 6:28 PM
Hi @embeducation,

Thanks for the tip and interest in this package.

For any one else reading this discussion, here is some extra information: the API provided with this package mimics the C/C++ interface from sqlite.org , you can always check the mentioned website for reference. Our documentation section is currently focused on installation, but I believe we could add some usage reference and examples.

In the meantime, in order to execute a statement, you first create a new SQLiteConnection instance, passing the db file path. Then, you can prepare an ISQLiteStatement by calling Prepare on the ISQLiteConnection instance, passing a string containing the SQL 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.
using (var connection = new SQLiteConnection("sample.db"))
    using (var statement = connection.Prepare("SELECT id, description FROM table;"))
        while (statement.Step() == SQLiteResult.ROW)
            var id = (long)statement["id"];
            var description = (string)statement["description"];

            // DO SOME STUFF
Marked as answer by leotilli on 9/5/2014 at 11:26 AM