[vala/staging: 4/4] sqlite3: Add Sqlite.OpenFlags enum for flags of Database.open_v2()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 4/4] sqlite3: Add Sqlite.OpenFlags enum for flags of Database.open_v2()
- Date: Mon, 30 Apr 2018 20:39:25 +0000 (UTC)
commit 4b0c123e3fa44961625959a298c62eb823c0d5da
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Apr 30 09:22:26 2018 +0200
sqlite3: Add Sqlite.OpenFlags enum for flags of Database.open_v2()
https://bugzilla.gnome.org/show_bug.cgi?id=795627
vapi/sqlite3.vapi | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/vapi/sqlite3.vapi b/vapi/sqlite3.vapi
index d6620db..bd1af22 100644
--- a/vapi/sqlite3.vapi
+++ b/vapi/sqlite3.vapi
@@ -70,7 +70,7 @@ namespace Sqlite {
return ec;
}
public static int open (string filename, out Database db);
- public static int open_v2 (string filename, out Database db, int flags = OPEN_READWRITE |
OPEN_CREATE, string? zVfs = null);
+ public static int open_v2 (string filename, out Database db, Sqlite.OpenFlags flags =
Sqlite.OpenFlags.READWRITE | Sqlite.OpenFlags.CREATE, string? zVfs = null);
public int errcode ();
public unowned string errmsg ();
public unowned Sqlite.Statement next_stmt (Sqlite.Statement? current);
@@ -339,6 +339,20 @@ namespace Sqlite {
TRIGGER_DEPTH
}
+ [CCode (cname = "int", cprefix = "SQLITE_OPEN_", has_type_id = false)]
+ [Flags]
+ public enum OpenFlags {
+ READONLY,
+ READWRITE,
+ CREATE,
+ URI,
+ MEMORY,
+ NOMUTEX,
+ FULLMUTEX,
+ SHAREDCACHE,
+ PRIVATECACHE
+ }
+
[CCode (cname = "int", cprefix = "SQLITE_STMTSTATUS_", has_type_id = false)]
public enum StatementStatus {
FULLSCAN_STEP,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]