--- vapi/sqlite3.vapi 2007-10-10 01:01:33.000000000 +0200 +++ /usr/share/vala/vapi/sqlite3.vapi 2007-11-10 16:41:51.000000000 +0100 @@ -18,25 +18,63 @@ * * Author: * Jürg Billeter + * pancake */ [CCode (lower_case_cprefix = "sqlite3_", cheader_filename = "sqlite3.h")] namespace Sqlite { + [CCode (cprefix = "SQLITE_")] + public enum Value { + OK = 0, + ERROR, + INTERNAL, + PERM, + ABORT, + BUSY, + LOCKED, + NOMEM, + READONLY, + INTERRUPT, + IOERR, + CORRUPT, + NOTFOUND, + FULL, + CANTOPEN, + PROTOCOL, + EMPTY, + SCHEMA, + TOOBIG, + CONSTRAINT, + MISMATCH, + MISUSE, + NOLFS, + AUTH, + FORMAT, + RANGE, + NOTADB, + ROW = 100, + DONE + } + [CCode (free_function = "sqlite3_close", cname = "sqlite3", cprefix = "sqlite3_")] public class Database { - public int exec (string! sql, Callback sqlite3_callback = null, pointer data = null, out string errmsg = null); + public Value exec (string! sql, Callback sqlite3_callback = null, pointer data = null, out string errmsg = null); public int64 last_insert_rowid (); public int changes (); public int total_changes (); public void interrupt (); + public int busy_timeout(int ms); public int complete (string! sql); public int get_table (string! sql, out string[] resultp, ref int nrow, ref int ncolumn, out string errmsg); + public static void free_table(string[] result); public static int open (string! filename, out Database db); public int errcode (); + public int extended_result_codes(bool onoff); public weak string errmsg (); public int prepare (string! sql, int n_bytes, out Statement stmt, out string tail = null); } + [NoArrayLength()] [CCode (cname = "sqlite3_callback")] public static delegate int Callback (pointer data, int n_columns, string[] values, string[] column_names); @@ -55,7 +93,7 @@ public int clear_bindings (); public int column_count (); public string! column_name (int index); - public int step (); + public Value step (); public int column_int (int i_col); } }