/// <summary> /// Update an object in the specified table. /// </summary> /// <typeparam name="TArgument"></typeparam> /// <param name="argumentValue">The argument value.</param> /// <param name="options">The update options.</param> /// <returns></returns> public ObjectDbCommandBuilder <AbstractCommand, AbstractParameter, TArgument> Update <TArgument>(TArgument argumentValue, UpdateOptions options = UpdateOptions.None) where TArgument : class { return(Update(DatabaseMetadata.GetTableOrViewFromClass <TArgument>().Name, argumentValue, options)); }
/// <summary> /// Inserts the batch of records as one operation.. /// </summary> /// <typeparam name="TObject">The type of the object.</typeparam> /// <param name="tableTypeName">Name of the table type.</param> /// <param name="objects">The objects.</param> /// <param name="options">The options.</param> /// <returns> /// MultipleRowDbCommandBuilder<SqlCommand, SqlParameter>. /// </returns> public MultipleRowDbCommandBuilder <SqlCommand, SqlParameter> InsertBatch <TObject>(IEnumerable <TObject> objects, SqlServerObjectName tableTypeName, InsertOptions options = InsertOptions.None) where TObject : class { return(InsertBatch(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, objects, tableTypeName, options)); }
/// <summary> /// Inserts the batch of records using bulk insert. /// </summary> /// <typeparam name="TObject">The type of the object.</typeparam> /// <param name="objects">The objects.</param> /// <param name="options">The options.</param> /// <returns> /// SqlServerInsertBulk. /// </returns> public SqlServerInsertBulk InsertBulk <TObject>(IEnumerable <TObject> objects, SqlBulkCopyOptions options = SqlBulkCopyOptions.Default) where TObject : class { return(InsertBulk(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, objects, options)); }
public TableDbCommandBuilder <SQLiteCommand, SQLiteParameter, SQLiteLimitOption> From <TObject>(object filterValue) where TObject : class { return(From(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, filterValue)); }
/// <summary> /// Performs an insert or update operation as appropriate. /// </summary> /// <typeparam name="TArgument"></typeparam> /// <param name="argumentValue">The argument value.</param> /// <param name="options">The options for how the insert/update occurs.</param> /// <returns></returns> public ObjectDbCommandBuilder <SQLiteCommand, SQLiteParameter, TArgument> Upsert <TArgument>(TArgument argumentValue, UpsertOptions options = UpsertOptions.None) where TArgument : class { return(Upsert(DatabaseMetadata.GetTableOrViewFromClass <TArgument>().Name, argumentValue, options)); }
/// <summary> /// Inserts an object into the specified table. /// </summary> /// <typeparam name="TArgument"></typeparam> /// <param name="argumentValue">The argument value.</param> /// <param name="options">The options for how the insert occurs.</param> /// <returns></returns> public ObjectDbCommandBuilder <OleDbCommand, OleDbParameter, TArgument> Insert <TArgument>(TArgument argumentValue, InsertOptions options = InsertOptions.None) where TArgument : class { return(Insert(DatabaseMetadata.GetTableOrViewFromClass <TArgument>().Name, argumentValue, options)); }
public TableDbCommandBuilder <SQLiteCommand, SQLiteParameter, SQLiteLimitOption> From <TObject>(string whereClause, object argumentValue) where TObject : class { return(From(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, whereClause, argumentValue)); }
/// <summary> /// Inserts the batch of records using bulk insert. /// </summary> /// <typeparam name="TObject">The type of the object.</typeparam> /// <param name="objects">The objects.</param> /// <returns> /// PostgreSqlInsertBulk. /// </returns> public PostgreSqlInsertBulk InsertBulk <TObject>(IEnumerable <TObject> objects) where TObject : class { return(InsertBulk(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, objects)); }
public TableDbCommandBuilder <OleDbCommand, OleDbParameter, AccessLimitOption> From <TObject>(string whereClause) where TObject : class { return(From(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, whereClause)); }
public PostgreSqlInsertBulk InsertBulk <TObject>(IDataReader dataReader) where TObject : class { return(InsertBulk(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, dataReader)); }
/// <summary> /// Inserts the batch of records as one operation. /// </summary> /// <typeparam name="TObject"></typeparam> /// <param name="objects">The objects to insert.</param> /// <param name="options">The options.</param> /// <returns>MultipleRowDbCommandBuilder<SqlCommand, SqlParameter>.</returns> public InsertBatchResult InsertBatch <TObject>(IEnumerable <TObject> objects, InsertOptions options = InsertOptions.None) where TObject : class { return(InsertBatch <TObject>(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, objects, options)); }
/// <summary> /// Inserts the batch of records as one operation. /// </summary> /// <typeparam name="TObject"></typeparam> /// <param name="objects">The objects to insert.</param> /// <param name="options">The options.</param> /// <returns>MultipleRowDbCommandBuilder<SqlCommand, SqlParameter>.</returns> public ILink <int> InsertMultipleBatch <TObject>(IReadOnlyList <TObject> objects, InsertOptions options = InsertOptions.None) where TObject : class { return(InsertMultipleBatch(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name, objects, options)); }
/// <summary> /// Gets a table or view's row count. /// </summary> ///<typeparam name="TObject">This is used to determine which view to count. If the class isn't associated with a view, then it looks for a matching table.</typeparam> public ILink <long> GetTableApproximateCount <TObject>() => GetTableApproximateCount(DatabaseMetadata.GetTableOrViewFromClass <TObject>(OperationType.Select).Name);
public TableDbCommandBuilder <AbstractCommand, AbstractParameter, AbstractLimitOption> From <TObject>() where TObject : class { return(From(DatabaseMetadata.GetTableOrViewFromClass <TObject>().Name)); }