Apologies for a single commit with various large changes, but the project is small enough where it shouldn't be a problem yet. This pull request implements the following changes:
Added distributable libraries for Windows and Linux
The Linux SO library is compiled by myself, so I'm not sure if it's suitable for distribution. I hope more people can test if it works on their machines.
Modified how the library is loaded based on the host OS
For now the code assumes that the Linux library should be used for every operating system other than Windows. I'm not sure if this works properly for things like MacOS.
Modified Step function - it now returns 1 if there is a row to read from and 0 if there is no more data. A do loop can now take Step as the condition to iterate through all returned rows.
Modified Prepare - it now returns a "Statement" object that consists of the sqlite3_stmt pointer and sqlite3 database pointer. That way other functions that consume the statement can reference the database for error messages without using an additional argument. You should only need the "Statement" object for functions that require it,
Modified Finalize to use the new "Statement" object.
Added "ColumnText" to read text from returned rows.
Updated the example to select data from the test table and print out the name column.
Other various changes for calling the library functions and naming things.
Apologies for a single commit with various large changes, but the project is small enough where it shouldn't be a problem yet. This pull request implements the following changes:
Step
function - it now returns1
if there is a row to read from and 0 if there is no more data. Ado
loop can now takeStep
as the condition to iterate through all returned rows.Prepare
- it now returns a "Statement" object that consists of thesqlite3_stmt
pointer andsqlite3
database pointer. That way other functions that consume the statement can reference the database for error messages without using an additional argument. You should only need the "Statement" object for functions that require it,Finalize
to use the new "Statement" object.