summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite.h
Commit message (Collapse)AuthorAgeFilesLines
* Updated copyright datesDavid Sommerseth2012-10-081-1/+1
| | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* sqlite: Added SQL function to convert datetime timestamps from UTC/GMT to ↵David Sommerseth2012-10-081-0/+2
| | | | | | | | | | | | | | localtime All CURRENT_TIMESTAMP calls are returned in UTC/GMT, and this value is stored in the database. When using eurephiadm to look at these datetime fields the UTC/GMT value is used, and needs to be taken in consideration when looking at the reports. This patch is the first step to handle the local time zone better. This patch also fixes the 'debug' program in sqlite.c, making use of the eurephia_log_init() and eurephia_log_close() calls for log preparations. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Implemented better error handling in the SQLite3 frameworkDavid Sommerseth2011-12-191-0/+33
| | | | | | | | | | | | | | | | The core sqlite_query() function will now always return a pointer to a dbresult structure. This structure now contains a query status and the error message from the sqlite3 backend if something went wrong. This means that error checking from now on should use the sqlite_query_status() macro and not to check if sqlite_query() returns NULL. Another fundamental change is that sqlite_free_results() must always be called on the dbresult structure now, to free the memory used by either data from the query or the error message. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Updated Copyright dates to include 2010David Sommerseth2010-07-301-1/+1
|
* Corrected some new Doxygen issuesDavid Sommerseth2009-09-281-2/+2
|
* Rewrote sqlite_get_num_tuples() and sqlite_get_affected_rows() as macrosDavid Sommerseth2009-09-261-2/+21
|
* Added comments to sqlite.[ch]David Sommerseth2009-09-081-27/+71
|
* SQLite3 - Added support for "affected rows" count on INSERT/UPDATE/DELETE ↵David Sommerseth2009-09-011-0/+2
| | | | queries
* Made the licence explicit GPLv2 onlyDavid Sommerseth2009-03-261-1/+1
|
* Cleaned up the code a little bitDavid Sommerseth2009-03-261-1/+2
| | | | | Made sure we only include needed include files and checked that the copyright headers are equal and correct
* Compile fix: Use sqlite_int64 instead of sqlite3_int64David Sommerseth2009-03-021-1/+1
| | | | | This makes it possible to compile it on some older versions of the SQLite3 library
* sqlite3 - Added saving last_insert_id on INSERT INTO queriesDavid Sommerseth2008-12-221-0/+1
|
* sqlite3 - Added sortkeys as argument to sqlite_query_mapped(...)David Sommerseth2008-12-201-1/+1
| | | | | The last argument to the function can contain a list over field names which will be used in the ORDER BY clause when doing SELECT queries.
* Added sqlite functions for populating an XML document directlyDavid Sommerseth2008-12-131-0/+8
|
* Update field mapping to include data type. Improved ↵David Sommerseth2008-12-081-1/+4
| | | | | | | | | | | | | | sqlite_query_mapped(...) function The new sqlite_query_mapped(...) function will now consider the field type when formatting the data values for SQLite. In addition reserved words on the DATETIME data type will be preserved without quote encapsulation. Improved the sqlite_query_mapped(...) to also handle UPDATE, INSERT and DELETE in addition to SELECT. The function now needs two eDBfieldMap mappings. The first one will contain update/insert values, while the last one defines search criteria.
* Extended sqlite.[ch] with sqlite_query_mapped(...)David Sommerseth2008-12-071-1/+2
| | | | | | | This functions does almost the same as sqlite_query(...), it takes an SQL statement without the WHERE clause. The where clause is built up based on the fields sent in via the eDBfieldMap struct, containing the fields and values to look for.
* Added GPLv2 licence, updated *.[ch] files to include license, with exception ↵David Sommerseth2008-08-081-1/+15
| | | | of memwatch and sha1
* Imported eurephia into gitDavid Sommerseth2008-08-061-0/+58