Example #1
0
        public Result Finalize(IDbStatement stmt)
        {
            var dbStatement  = (DbStatement)stmt;
            var internalStmt = dbStatement.InternalStmt;

            return(SQLite3UWP.Finalize(internalStmt));
        }
Example #2
0
        public Result Open(byte[] filename, out IDbHandle db, int flags, IntPtr zvfs)
        {
            var ret = SQLite3UWP.Open(filename, out Sqlite3DatabaseHandle internalDbHandle, flags, zvfs);

            db = new DbHandle(internalDbHandle);
            return(ret);
        }
Example #3
0
        public byte[] ColumnBlob(IDbStatement stmt, int index)
        {
            var dbStatement = (DbStatement)stmt;
            var length      = ColumnBytes(stmt, index);
            var result      = new byte[length];

            if (length > 0)
            {
                Marshal.Copy(SQLite3UWP.ColumnBlob(dbStatement.InternalStmt, index), result, 0, length);
            }

            return(result);
        }
Example #4
0
        public IDbStatement Prepare2(IDbHandle db, string query)
        {
            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }

            var dbHandle = (DbHandle)db;
            var r        = SQLite3UWP.Prepare2(dbHandle.InternalDbHandle, query, query.Length, out Sqlite3DatabaseHandle stmt, IntPtr.Zero);

            if (r != Result.OK)
            {
                throw SQLiteException.New(r, SQLite3UWP.GetErrmsg(dbHandle.InternalDbHandle));
            }
            return(new DbStatement(stmt));
        }
Example #5
0
        public IDbBackupHandle BackupInit(IDbHandle destHandle, string destName, IDbHandle srcHandle, string srcName)
        {
            var internalDestDb = (DbHandle)destHandle;
            var internalSrcDb  = (DbHandle)srcHandle;

            var p = SQLite3UWP.sqlite3_backup_init(internalDestDb.InternalDbHandle,
                                                   destName,
                                                   internalSrcDb.InternalDbHandle,
                                                   srcName);

            if (p == IntPtr.Zero)
            {
                return(null);
            }
            else
            {
                return(new DbBackupHandle(p));
            }
        }
Example #6
0
        public int BackupRemaining(IDbBackupHandle handle)
        {
            var internalBackup = (DbBackupHandle)handle;

            return(SQLite3UWP.sqlite3_backup_remaining(internalBackup.DbBackupPtr));
        }
Example #7
0
        public Result BackupFinish(IDbBackupHandle handle)
        {
            var internalBackup = (DbBackupHandle)handle;

            return(SQLite3UWP.sqlite3_backup_finish(internalBackup.DbBackupPtr));
        }
Example #8
0
        public Result BackupStep(IDbBackupHandle handle, int pageCount)
        {
            var internalBackup = (DbBackupHandle)handle;

            return(SQLite3UWP.sqlite3_backup_step(internalBackup.DbBackupPtr, pageCount));
        }
Example #9
0
        public ColType ColumnType(IDbStatement stmt, int index)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.ColumnType(dbStatement.InternalStmt, index));
        }
Example #10
0
        public Result BusyTimeout(IDbHandle db, int milliseconds)
        {
            var dbHandle = (DbHandle)db;

            return(SQLite3UWP.BusyTimeout(dbHandle.InternalDbHandle, milliseconds));
        }
Example #11
0
        public int BindParameterIndex(IDbStatement stmt, string name)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.BindParameterIndex(dbStatement.InternalStmt, name));
        }
Example #12
0
        public int BindInt64(IDbStatement stmt, int index, long val)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.BindInt64(dbStatement.InternalStmt, index, val));
        }
Example #13
0
        public int BindDouble(IDbStatement stmt, int index, double val)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.BindDouble(dbStatement.InternalStmt, index, val));
        }
Example #14
0
        public int BindBlob(IDbStatement stmt, int index, byte[] val, int n, IntPtr free)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.BindBlob(dbStatement.InternalStmt, index, val, n, free));
        }
Example #15
0
        public long LastInsertRowid(IDbHandle db)
        {
            var dbHandle = (DbHandle)db;

            return(SQLite3UWP.LastInsertRowid(dbHandle.InternalDbHandle));
        }
Example #16
0
        public string ColumnName16(IDbStatement stmt, int index)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.ColumnName16(dbStatement.InternalStmt, index));
        }
Example #17
0
        public string Errmsg16(IDbHandle db)
        {
            var dbHandle = (DbHandle)db;

            return(SQLite3UWP.GetErrmsg(dbHandle.InternalDbHandle));
        }
Example #18
0
 public string SourceID()
 {
     return(Marshal.PtrToStringAnsi(SQLite3UWP.sqlite3_sourceid()));
 }
Example #19
0
 public int LibVersionNumber()
 {
     return(SQLite3UWP.sqlite3_libversion_number());
 }
Example #20
0
        public int BackupPagecount(IDbBackupHandle handle)
        {
            var internalBackup = (DbBackupHandle)handle;

            return(SQLite3UWP.sqlite3_backup_pagecount(internalBackup.DbBackupPtr));
        }
Example #21
0
 public int Sleep(int millis)
 {
     return(SQLite3UWP.sqlite3_sleep(millis));
 }
Example #22
0
        public ExtendedResult ExtendedErrCode(IDbHandle db)
        {
            var dbHandle = (DbHandle)db;

            return(SQLite3UWP.sqlite3_extended_errcode(dbHandle.InternalDbHandle));
        }
Example #23
0
        public int BindNull(IDbStatement stmt, int index)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.BindNull(dbStatement.InternalStmt, index));
        }
Example #24
0
        public Result Close(IDbHandle db)
        {
            var dbHandle = (DbHandle)db;

            return(SQLite3UWP.Close(dbHandle.InternalDbHandle));
        }
Example #25
0
        public int BindText16(IDbStatement stmt, int index, string val, int n, IntPtr free)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.BindText(dbStatement.InternalStmt, index, val, n, free));
        }
Example #26
0
        public long ColumnInt64(IDbStatement stmt, int index)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.ColumnInt64(dbStatement.InternalStmt, index));
        }
Example #27
0
        public int Changes(IDbHandle db)
        {
            var dbHandle = (DbHandle)db;

            return(SQLite3UWP.Changes(dbHandle.InternalDbHandle));
        }
Example #28
0
        public string ColumnText16(IDbStatement stmt, int index)
        {
            var dbStatement = (DbStatement)stmt;

            return(Marshal.PtrToStringUni(SQLite3UWP.ColumnText16(dbStatement.InternalStmt, index)));
        }
Example #29
0
 public Result Config(ConfigOption option)
 {
     return(SQLite3UWP.Config(option));
 }
Example #30
0
        public Result Step(IDbStatement stmt)
        {
            var dbStatement = (DbStatement)stmt;

            return(SQLite3UWP.Step(dbStatement.InternalStmt));
        }