public override SQLiteErrorCode Column(SQLiteVirtualTableCursor cursor, SQLiteContext context, int index)
        {
            this.CheckDisposed();
            SQLiteVirtualTableCursorEnumerator sQLiteVirtualTableCursorEnumerator = cursor as SQLiteVirtualTableCursorEnumerator;

            if (sQLiteVirtualTableCursorEnumerator == null)
            {
                return(this.CursorTypeMismatchError(cursor, typeof(SQLiteVirtualTableCursorEnumerator)));
            }
            if (sQLiteVirtualTableCursorEnumerator.EndOfEnumerator)
            {
                return(this.CursorEndOfEnumeratorError(cursor));
            }
            object current = sQLiteVirtualTableCursorEnumerator.Current;

            if (current == null)
            {
                context.SetNull();
            }
            else
            {
                context.SetString(this.GetStringFromObject(cursor, current));
            }
            return(SQLiteErrorCode.Ok);
        }
        public override bool Eof(SQLiteVirtualTableCursor cursor)
        {
            this.CheckDisposed();
            SQLiteVirtualTableCursorEnumerator sQLiteVirtualTableCursorEnumerator = cursor as SQLiteVirtualTableCursorEnumerator;

            if (sQLiteVirtualTableCursorEnumerator != null)
            {
                return(sQLiteVirtualTableCursorEnumerator.EndOfEnumerator);
            }
            return(this.ResultCodeToEofResult(this.CursorTypeMismatchError(cursor, typeof(SQLiteVirtualTableCursorEnumerator))));
        }
        public override SQLiteErrorCode Close(SQLiteVirtualTableCursor cursor)
        {
            this.CheckDisposed();
            SQLiteVirtualTableCursorEnumerator sQLiteVirtualTableCursorEnumerator = cursor as SQLiteVirtualTableCursorEnumerator;

            if (sQLiteVirtualTableCursorEnumerator != null)
            {
                sQLiteVirtualTableCursorEnumerator.Close();
                return(SQLiteErrorCode.Ok);
            }
            return(this.CursorTypeMismatchError(cursor, typeof(SQLiteVirtualTableCursorEnumerator)));
        }
        public override SQLiteErrorCode Filter(SQLiteVirtualTableCursor cursor, int indexNumber, string indexString, SQLiteValue[] values)
        {
            this.CheckDisposed();
            SQLiteVirtualTableCursorEnumerator sQLiteVirtualTableCursorEnumerator = cursor as SQLiteVirtualTableCursorEnumerator;

            if (sQLiteVirtualTableCursorEnumerator == null)
            {
                return(this.CursorTypeMismatchError(cursor, typeof(SQLiteVirtualTableCursorEnumerator)));
            }
            sQLiteVirtualTableCursorEnumerator.Filter(indexNumber, indexString, values);
            sQLiteVirtualTableCursorEnumerator.Reset();
            sQLiteVirtualTableCursorEnumerator.MoveNext();
            return(SQLiteErrorCode.Ok);
        }
        public override SQLiteErrorCode RowId(SQLiteVirtualTableCursor cursor, ref long rowId)
        {
            this.CheckDisposed();
            SQLiteVirtualTableCursorEnumerator sQLiteVirtualTableCursorEnumerator = cursor as SQLiteVirtualTableCursorEnumerator;

            if (sQLiteVirtualTableCursorEnumerator == null)
            {
                return(this.CursorTypeMismatchError(cursor, typeof(SQLiteVirtualTableCursorEnumerator)));
            }
            if (sQLiteVirtualTableCursorEnumerator.EndOfEnumerator)
            {
                return(this.CursorEndOfEnumeratorError(cursor));
            }
            rowId = this.GetRowIdFromObject(cursor, sQLiteVirtualTableCursorEnumerator.Current);
            return(SQLiteErrorCode.Ok);
        }
        public override SQLiteErrorCode Next(SQLiteVirtualTableCursor cursor)
        {
            this.CheckDisposed();
            SQLiteVirtualTableCursorEnumerator sQLiteVirtualTableCursorEnumerator = cursor as SQLiteVirtualTableCursorEnumerator;

            if (sQLiteVirtualTableCursorEnumerator == null)
            {
                return(this.CursorTypeMismatchError(cursor, typeof(SQLiteVirtualTableCursorEnumerator)));
            }
            if (sQLiteVirtualTableCursorEnumerator.EndOfEnumerator)
            {
                return(this.CursorEndOfEnumeratorError(cursor));
            }
            sQLiteVirtualTableCursorEnumerator.MoveNext();
            return(SQLiteErrorCode.Ok);
        }
 public override SQLiteErrorCode Open(SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor)
 {
     this.CheckDisposed();
     cursor = new SQLiteVirtualTableCursorEnumerator(table, this.enumerable.GetEnumerator());
     return(SQLiteErrorCode.Ok);
 }