public SQLite3Handle(string InDataBasePath, SQLite3OpenFlags InFlags) { Assert.IsFalse(string.IsNullOrEmpty(InDataBasePath), "Database path can not be null."); if (SQLite3Result.OK == SQLite3.Open(ConvertStringToUTF8Bytes(InDataBasePath), out handle, (int)InFlags, IntPtr.Zero)) { stringBuilder = new StringBuilder(1024); } else { SQLite3.Close(handle); handle = IntPtr.Zero; Debug.LogError("Database failed to open."); } }
public SQLite3Handle(string InDataBasePath, SQLite3OpenFlags InFlags) { #if UNITY_EDITOR Assert.raiseExceptions = true; #else Assert.raiseExceptions = true; #endif Assert.IsFalse(string.IsNullOrEmpty(InDataBasePath), "数据库路径不能为空!"); if (SQLite3Result.OK != SQLite3.Open(ConvertStringToUTF8Bytes(InDataBasePath), out handle, InFlags.GetHashCode(), IntPtr.Zero)) { SQLite3.Close(handle); handle = IntPtr.Zero; Debug.LogError("数据库打开失败!"); } else { stringBuilder = new StringBuilder(1024); } }
public static extern SQLite3Error OpenV2(byte[] utf8Filename, out IntPtr db, SQLite3OpenFlags flags, IntPtr vfs);