vala r1190 - in trunk: . vapi



Author: juergbi
Date: Sat Apr 12 21:41:17 2008
New Revision: 1190
URL: http://svn.gnome.org/viewvc/vala?rev=1190&view=rev

Log:
2008-04-12  Juerg Billeter  <j bitron ch>

	* vapi/sqlite3.vapi: various improvements, patch by Evan Nemerson


Modified:
   trunk/ChangeLog
   trunk/vapi/sqlite3.vapi

Modified: trunk/vapi/sqlite3.vapi
==============================================================================
--- trunk/vapi/sqlite3.vapi	(original)
+++ trunk/vapi/sqlite3.vapi	Sat Apr 12 21:41:17 2008
@@ -37,7 +37,8 @@
 		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 @@
 	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 @@
 		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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]