diff options
author | Juerg Billeter <j@bitron.ch> | 2008-04-12 20:41:17 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-04-12 20:41:17 +0000 |
commit | 6f91a85ce429753609f07baf385bf72717f73b10 (patch) | |
tree | e31f5faaa77eafbeecffd82e4677fd27fb2628d5 | |
parent | f150096d5a11ddb0dfda7ffa0447770475019353 (diff) | |
download | vala-0-2.tar.gz |
various improvements, patch by Evan Nemersonvala-0-2
2008-04-12 Juerg Billeter <j@bitron.ch>
* vapi/sqlite3.vapi: various improvements, patch by Evan Nemerson
svn path=/trunk/; revision=1190
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | vapi/sqlite3.vapi | 21 |
2 files changed, 23 insertions, 2 deletions
@@ -1,5 +1,9 @@ 2008-04-12 Jürg Billeter <j@bitron.ch> + * vapi/sqlite3.vapi: various improvements, patch by Evan Nemerson + +2008-04-12 Jürg Billeter <j@bitron.ch> + * vapi/glib-2.0.vapi: fix sscanf and add g_hash_table_remove_all bindings, patch by Evan Nemerson diff --git a/vapi/sqlite3.vapi b/vapi/sqlite3.vapi index 0db0ad2ed..daa65e78e 100644 --- a/vapi/sqlite3.vapi +++ b/vapi/sqlite3.vapi @@ -37,7 +37,8 @@ namespace Sqlite { 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); + [CCode (cname = "sqlite3_open_v2")] + public static int open (string! filename, out Database db, int flags = OPEN_READWRITE | OPEN_CREATE, string zVfs = null); public int errcode (); public weak string errmsg (); public int prepare (string! sql, int n_bytes, out Statement stmt, out string tail = null); @@ -126,6 +127,22 @@ namespace Sqlite { public const int ROW; [CCode (cname = "SQLITE_DONE")] public const int DONE; + [CCode (cname = "SQLITE_OPEN_READONLY")] + public const int OPEN_READONLY; + [CCode (cname = "SQLITE_OPEN_READWRITE")] + public const int OPEN_READWRITE; + [CCode (cname = "SQLITE_OPEN_CREATE")] + public const int OPEN_CREATE; + [CCode (cname = "SQLITE_INTEGER")] + public const int INTEGER; + [CCode (cname = "SQLITE_FLOAT")] + public const int FLOAT; + [CCode (cname = "SQLITE_BLOB")] + public const int BLOB; + [CCode (cname = "SQLITE_NULL")] + public const int NULL; + [CCode (cname = "SQLITE3_TEXT")] + public const int TEXT; /* SQL Statement Object */ [CCode (free_function = "sqlite3_finalize", cname = "sqlite3_stmt", cprefix = "sqlite3_")] @@ -144,7 +161,7 @@ namespace Sqlite { public int bind_int (int index, int value); public int bind_int64 (int index, int64 value); public int bind_null (int index); - public int bind_text (int index, string! value, int n, GLib.DestroyNotify destroy_notify); + public int bind_text (int index, string!# value, int n = -1, GLib.DestroyNotify destroy_notify = GLib.g_free); public int bind_value (int index, Value value); public int bind_zeroblob (int index, int n); public void* column_blob (int col); |