vala r2176 - in trunk: . vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2176 - in trunk: . vapi
- Date: Tue, 16 Dec 2008 08:36:21 +0000 (UTC)
Author: juergbi
Date: Tue Dec 16 08:36:21 2008
New Revision: 2176
URL: http://svn.gnome.org/viewvc/vala?rev=2176&view=rev
Log:
2008-12-16 JÃrg Billeter <j bitron ch>
* vapi/sqlite3.vapi:
Add transaction hook, tracing, profiling, and mutex bindings,
patch by Evan Nemerson, fixes bug 564571
Modified:
trunk/ChangeLog
trunk/vapi/sqlite3.vapi
Modified: trunk/vapi/sqlite3.vapi
==============================================================================
--- trunk/vapi/sqlite3.vapi (original)
+++ trunk/vapi/sqlite3.vapi Tue Dec 16 08:36:21 2008
@@ -45,8 +45,20 @@
public int errcode ();
public weak string errmsg ();
public int prepare (string sql, int n_bytes, out Statement stmt, out string tail = null);
+ public int prepare_v2 (string sql, int n_bytes, out Statement stmt, out string tail = null);
+ public void trace (TraceCallback? xtrace);
+ public void profile (ProfileCallback? xprofile);
+ public void commit_hook (CommitCallback? commit_hook);
+ public void rollback_hook (RollbackCallback? rollback_hook);
}
+ [CCode (instance_pos = 0)]
+ public delegate void TraceCallback (string message);
+ [CCode (instance_pos = 0)]
+ public delegate void ProfileCallback (string sql, uint64 time);
+ public delegate int CommitCallback ();
+ public delegate void RollbackCallback ();
+
/* Dynamically Typed Value Object */
[Compact]
[CCode (cname = "sqlite3_value")]
@@ -147,6 +159,10 @@
public const int NULL;
[CCode (cname = "SQLITE3_TEXT")]
public const int TEXT;
+ [CCode (cname = "SQLITE_MUTEX_FAST")]
+ public const int MUTEX_FAST;
+ [CCode (cname = "SQLITE_MUTEX_RECURSIVE")]
+ public const int MUTEX_RECURSIVE;
/* SQL Statement Object */
[Compact]
@@ -154,7 +170,7 @@
public class Statement {
public int bind_parameter_count ();
public int bind_parameter_index (string name);
- public string bind_parameter_name (int index);
+ public weak string bind_parameter_name (int index);
public int clear_bindings ();
public int column_count ();
public int data_count ();
@@ -178,6 +194,17 @@
public int column_type (int col);
public weak Value column_value (int col);
public weak string column_name (int index);
+ public weak string sql ();
+ }
+
+ [Compact]
+ [CCode (cname = "sqlite3_mutex")]
+ public class Mutex {
+ [CCode (cname = "sqlite3_mutex_alloc")]
+ public Mutex (int mutex_type = MUTEX_RECURSIVE);
+ public void enter ();
+ public int @try ();
+ public void leave ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]