/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Rollback" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Rollback" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Rollback" /> method. /// </returns> public override SQLiteErrorCode Rollback( SQLiteVirtualTable table ) { CheckDisposed(); return(GetMethodResultCode("Rollback")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Begin" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Begin" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Begin" /> method. /// </returns> public override SQLiteErrorCode Begin( SQLiteVirtualTable table ) { CheckDisposed(); return(GetMethodResultCode("Begin")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Commit" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Commit" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Commit" /> method. /// </returns> public override SQLiteErrorCode Commit( SQLiteVirtualTable table ) { CheckDisposed(); return(GetMethodResultCode("Commit")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </returns> public override SQLiteErrorCode Destroy( SQLiteVirtualTable table ) { CheckDisposed(); return(GetMethodResultCode("Destroy")); }
/////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this object instance. /// </param> /// <param name="enumerator"> /// The <see cref="IEnumerator{T}" /> instance to expose as a virtual /// table cursor. /// </param> public SQLiteVirtualTableCursorEnumerator( SQLiteVirtualTable table, IEnumerator <T> enumerator ) : base(table, enumerator as IEnumerator) { this.enumerator = enumerator; }
/////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this object instance. /// </param> /// <param name="enumerator"> /// The <see cref="IEnumerator" /> instance to expose as a virtual /// table cursor. /// </param> public SQLiteVirtualTableCursorEnumerator( SQLiteVirtualTable table, IEnumerator enumerator ) : base(table) { this.enumerator = enumerator; this.endOfEnumerator = true; }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </param> /// <param name="savepoint"> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </returns> public override SQLiteErrorCode RollbackTo( SQLiteVirtualTable table, int savepoint ) { CheckDisposed(); return(GetMethodResultCode("RollbackTo")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </returns> public override SQLiteErrorCode BestIndex( SQLiteVirtualTable table, SQLiteIndex index ) { CheckDisposed(); return(GetMethodResultCode("BestIndex")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </returns> public override SQLiteErrorCode Destroy( SQLiteVirtualTable table ) { CheckDisposed(); table.Dispose(); return(SQLiteErrorCode.Ok); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </returns> public override SQLiteErrorCode Open( SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor ) { CheckDisposed(); return(GetMethodResultCode("Open")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <param name="newName"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </returns> public override SQLiteErrorCode Rename( SQLiteVirtualTable table, string newName ) { CheckDisposed(); return(GetMethodResultCode("Rename")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="values"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </returns> public override SQLiteErrorCode Update( SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId ) { CheckDisposed(); return(GetMethodResultCode("Update")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </returns> public override SQLiteErrorCode Open( SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor ) { CheckDisposed(); cursor = new SQLiteVirtualTableCursorEnumerator( table, enumerable.GetEnumerator()); return(SQLiteErrorCode.Ok); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </summary> /// <param name="connection"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="arguments"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="error"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </returns> public override SQLiteErrorCode Connect( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ) { CheckDisposed(); return(GetMethodResultCode("Connect")); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="argumentCount"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="name"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="function"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </returns> public override bool FindFunction( SQLiteVirtualTable table, int argumentCount, string name, ref SQLiteFunction function, ref IntPtr pClientData ) { CheckDisposed(); return(ResultCodeToFindFunctionResult(GetMethodResultCode( "FindFunction"))); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="values"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </returns> public override SQLiteErrorCode Update( SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId ) { CheckDisposed(); SetTableError(table, String.Format(CultureInfo.CurrentCulture, "virtual table \"{0}\" is read-only", table.TableName)); return(SQLiteErrorCode.Error); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </returns> public override SQLiteErrorCode BestIndex( SQLiteVirtualTable table, SQLiteIndex index ) { CheckDisposed(); if (!table.BestIndex(index)) { SetTableError(table, String.Format(CultureInfo.CurrentCulture, "failed to select best index for virtual table \"{0}\"", table.TableName)); return(SQLiteErrorCode.Error); } return(SQLiteErrorCode.Ok); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <param name="newName"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </returns> public override SQLiteErrorCode Rename( SQLiteVirtualTable table, string newName ) { CheckDisposed(); if (!table.Rename(newName)) { SetTableError(table, String.Format(CultureInfo.CurrentCulture, "failed to rename virtual table from \"{0}\" to \"{1}\"", table.TableName, newName)); return(SQLiteErrorCode.Error); } return(SQLiteErrorCode.Ok); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </summary> /// <param name="connection"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="arguments"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="error"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </returns> public override SQLiteErrorCode Connect( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ) { CheckDisposed(); if (DeclareTable( connection, GetSqlForDeclareTable(), ref error) == SQLiteErrorCode.Ok) { table = new SQLiteVirtualTable(arguments); return(SQLiteErrorCode.Ok); } return(SQLiteErrorCode.Error); }