[vala] sqlite3: Add sqlite3_create_collation binding.



commit 0af8e46e836c3a73cfbf9d3848ab9a067eb202d8
Author: Julian Andres Klode <jak jak-linux org>
Date:   Thu May 13 20:44:15 2010 -0700

    sqlite3: Add sqlite3_create_collation binding.
    
    Add the sqlite3_create_collation binding which makes it possible
    to define custom collation sequences.
    
    Fixes bug 618406.

 vapi/sqlite3.vapi |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/vapi/sqlite3.vapi b/vapi/sqlite3.vapi
index 801154c..ddb81d8 100644
--- a/vapi/sqlite3.vapi
+++ b/vapi/sqlite3.vapi
@@ -87,6 +87,7 @@ namespace Sqlite {
 		public void rollback_hook (RollbackCallback? rollback_hook);
 		public void update_hook (UpdateCallback? update_hook);
 		public int create_function (string zFunctionName, int nArg, int eTextRep, void * user_data, UserFuncCallback? xFunc, UserFuncCallback? xStep, UserFuncFinishCallback? xFinal);
+		public int create_collation (string zName, int eTextRep, [CCode (delegate_target_pos = 2.9, type = "int (*)(void *, int,  const void *, int,  const void *)")] CompareCallback xCompare);
 	}
 
 	[CCode (instance_pos = 0)]
@@ -104,6 +105,8 @@ namespace Sqlite {
 	public delegate void UserFuncFinishCallback (Sqlite.Context context);
 	[CCode (instance_pos = 0)]
 	public delegate void UpdateCallback (Sqlite.Action action, string dbname, string table, int64 rowid);
+	[CCode (instance_pos = 0)]
+	public delegate int CompareCallback (int alen, void* a, int blen, void* b);
 
 	public unowned string? compileoption_get (int n);
 	public int compileoption_used (string option_name);



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