aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMSQLite.h
diff options
context:
space:
mode:
authorGravatar Nicholas Tsoi-A-Sue <nicktsue@google.com>2020-06-10 11:58:16 -0700
committerGravatar Thomas Van Lenten <thomasvl@google.com>2020-06-10 15:16:36 -0400
commit960dd6068bb7f98d31808a223f4de081efa57e0f (patch)
treed78cb4d19aec8efebbf5cf698cf4015522aa308e /Foundation/GTMSQLite.h
parent1902ad87111e7e1e8ad7b21f515697c91e4427f2 (diff)
Create interface for initializing DB with SQLite flags
Diffstat (limited to 'Foundation/GTMSQLite.h')
-rw-r--r--Foundation/GTMSQLite.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Foundation/GTMSQLite.h b/Foundation/GTMSQLite.h
index 0daa02c..883c903 100644
--- a/Foundation/GTMSQLite.h
+++ b/Foundation/GTMSQLite.h
@@ -122,6 +122,29 @@
//
+ (NSString *)sqliteVersionString;
+// Open a database instance on a file-based database.
+//
+// Args:
+// path: Path to the database. If it does not exist, an empty database will be created only if
+// the SQLITE_OPEN_CREATE flag is specified.
+// withCFAdditions: If true, the SQLite database will include CFString
+// based string functions and collation sequences. See
+// the class header for information on these differences
+// and performance impact.
+// utf8: If true, the path argument is interpreted as UTF-8. If false, it's interpreted as
+// UTF-16 in the native byte order.
+// flags: The SQLite flags to use when opening a DB file (e.g. SQLITE_OPEN_READWRITE). This
+// argument is ignored if utf8 is false.
+// err: Result code from SQLite. If nil is returned by this function
+// check the result code for the error. If NULL no result code is
+// reported.
+//
+- (id)initWithPath:(NSString *)path
+ withCFAdditions:(BOOL)additions
+ utf8:(BOOL)useUTF8
+ flags:(int)flags
+ errorCode:(int *)err;
+
// Create and open a database instance on a file-based database.
//
// Args:
@@ -131,6 +154,8 @@
// based string functions and collation sequences. See
// the class header for information on these differences
// and performance impact.
+// utf8: If true, the path argument is interpreted as UTF-8. If false, it's interpreted as
+// UTF-16 in the native byte order.
// err: Result code from SQLite. If nil is returned by this function
// check the result code for the error. If NULL no result code is
// reported.