public override SQLiteErrorCode Update(SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId)
        {
            this.CheckDisposed();
            CultureInfo currentCulture = CultureInfo.CurrentCulture;

            object[] tableName = new object[] { table.TableName };
            this.SetTableError(table, HelperMethods.StringFormat(currentCulture, "virtual table \"{0}\" is read-only", tableName));
            return(SQLiteErrorCode.Error);
        }
 public override SQLiteErrorCode Connect(SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error)
 {
     this.CheckDisposed();
     if (this.DeclareTable(connection, this.GetSqlForDeclareTable(), ref error) != SQLiteErrorCode.Ok)
     {
         return(SQLiteErrorCode.Error);
     }
     table = new SQLiteVirtualTable(arguments);
     return(SQLiteErrorCode.Ok);
 }
        public override SQLiteErrorCode BestIndex(SQLiteVirtualTable table, SQLiteIndex index)
        {
            this.CheckDisposed();
            if (table.BestIndex(index))
            {
                return(SQLiteErrorCode.Ok);
            }
            CultureInfo currentCulture = CultureInfo.CurrentCulture;

            object[] tableName = new object[] { table.TableName };
            this.SetTableError(table, HelperMethods.StringFormat(currentCulture, "failed to select best index for virtual table \"{0}\"", tableName));
            return(SQLiteErrorCode.Error);
        }
        public override SQLiteErrorCode Rename(SQLiteVirtualTable table, string newName)
        {
            this.CheckDisposed();
            if (table.Rename(newName))
            {
                return(SQLiteErrorCode.Ok);
            }
            CultureInfo currentCulture = CultureInfo.CurrentCulture;

            object[] tableName = new object[] { table.TableName, newName };
            this.SetTableError(table, HelperMethods.StringFormat(currentCulture, "failed to rename virtual table from \"{0}\" to \"{1}\"", tableName));
            return(SQLiteErrorCode.Error);
        }
Example #5
0
 public override SQLiteErrorCode BestIndex(SQLiteVirtualTable table, SQLiteIndex index)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("BestIndex"));
 }
Example #6
0
 public override SQLiteErrorCode Update(SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Update"));
 }
Example #7
0
 public override SQLiteErrorCode Savepoint(SQLiteVirtualTable table, int savepoint)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Savepoint"));
 }
Example #8
0
 public override SQLiteErrorCode Rollback(SQLiteVirtualTable table)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Rollback"));
 }
Example #9
0
 public override SQLiteErrorCode Begin(SQLiteVirtualTable table)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Begin"));
 }
Example #10
0
 public override SQLiteErrorCode Rename(SQLiteVirtualTable table, string newName)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Rename"));
 }
 public override SQLiteErrorCode Open(SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor)
 {
     this.CheckDisposed();
     cursor = new SQLiteVirtualTableCursorEnumerator(table, this.enumerable.GetEnumerator());
     return(SQLiteErrorCode.Ok);
 }
Example #12
0
 public override bool FindFunction(SQLiteVirtualTable table, int argumentCount, string name, ref SQLiteFunction function, ref IntPtr pClientData)
 {
     this.CheckDisposed();
     return(this.ResultCodeToFindFunctionResult(this.GetMethodResultCode("FindFunction")));
 }
 public SQLiteVirtualTableCursor(SQLiteVirtualTable table) : this()
 {
     this.table = table;
 }
Example #14
0
 public SQLiteVirtualTableCursorEnumerator(SQLiteVirtualTable table, IEnumerator enumerator) : base(table)
 {
     this.enumerator      = enumerator;
     this.endOfEnumerator = true;
 }
Example #15
0
 public override SQLiteErrorCode Create(SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Create"));
 }
Example #16
0
 public override SQLiteErrorCode Open(SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Open"));
 }
Example #17
0
 public override SQLiteErrorCode Disconnect(SQLiteVirtualTable table)
 {
     this.CheckDisposed();
     return(this.GetMethodResultCode("Disconnect"));
 }
 public override SQLiteErrorCode Disconnect(SQLiteVirtualTable table)
 {
     this.CheckDisposed();
     table.Dispose();
     return(SQLiteErrorCode.Ok);
 }