Interface IOrpheusTable
- Namespace
- OrpheusInterfaces.Core
- Assembly
- OrpheusInterfaces.dll
Orpheus table is the core Orpheus data object. It is responsible for performing data operations.
public interface IOrpheusTable : IDisposable
- Inherited Members
Properties
BatchSize
Maximum number of rows batched into a single round trip when executing queued inserts/updates/deletes. Default: 100.
int BatchSize { get; set; }
Property Value
DetailTables
List of dependent detail tables.
List<IOrpheusTable> DetailTables { get; }
Property Value
- List<IOrpheusTable>
List of detail tables
KeyFields
Table's key field(s).
List<IOrpheusTableKeyField> KeyFields { get; set; }
Property Value
- List<IOrpheusTableKeyField>
Table's key field(s)
Level
Table's level. Zero if the table is not a child to any other table.
int Level { get; }
Property Value
- int
Table's level
MasterTable
Master table name, if the table is a detail table.
IOrpheusTable MasterTable { get; set; }
Property Value
- IOrpheusTable
Master table name
MasterTableKeyFields
Master table's key field(s), if the table is detail table.
List<IOrpheusTableKeyField> MasterTableKeyFields { get; }
Property Value
- List<IOrpheusTableKeyField>
Master table key fields
Modified
True when table data have been modified.
bool Modified { get; }
Property Value
- bool
True if table data have been modified
Name
The table name.
string Name { get; }
Property Value
- string
Table name
SchemaName
The table's schema name. Applicable only if the db engine is SQL Server.
string SchemaName { get; }
Property Value
Methods
ClearData()
Clears existing loaded data.
void ClearData()
ExecuteDeletes(IDbTransaction)
Executes any delete changes that the table has.
void ExecuteDeletes(IDbTransaction transaction)
Parameters
transactionIDbTransaction
ExecuteInserts(IDbTransaction)
Executes any insert changes that the table has.
void ExecuteInserts(IDbTransaction transaction)
Parameters
transactionIDbTransaction
ExecuteUpdates(IDbTransaction)
Executes any update changes that the table has.
void ExecuteUpdates(IDbTransaction transaction)
Parameters
transactionIDbTransaction
GetKeyValues()
Returns list of current key values.
List<KeyValuePair<string, object>> GetKeyValues()
Returns
- List<KeyValuePair<string, object>>
List of current key values
Load(Dictionary<string, List<object>>, LogicalOperator, bool)
Loads records from the DB to the table. You can configure having multiple fields and multiple values per field. Multiple field values are bound with a logical OR. Multiple fields by default are bound with a logical OR. Defining a logical operator, you can change the default behavior.
void Load(Dictionary<string, List<object>> keyValues, LogicalOperator logicalOperator = LogicalOperator.loOR, bool clearExistingData = true)
Parameters
keyValuesDictionary<string, List<object>>logicalOperatorLogicalOperatorclearExistingDatabool
Load(List<object>, bool)
Loads records from the DB to the table.
void Load(List<object> keyValues = null, bool clearExistingData = true)
Parameters
Load(IDbCommand, bool)
Loads table data by executing a db command.
void Load(IDbCommand dbCommand, bool clearExistingData = true)
Parameters
dbCommandIDbCommandclearExistingDatabool
Load(string, bool)
Loads table data by executing a SQL command.
void Load(string SQL, bool clearExistingData = true)
Parameters
Save(IDbTransaction, bool)
Save changes to the database.
void Save(IDbTransaction dbTransaction = null, bool commitTransaction = true)
Parameters
dbTransactionIDbTransactionTransaction in which the commands will be executed
commitTransactionboolCommit transaction after save.
Events
OnAfterSave
Occurs after the transaction has been committed.
event EventHandler<ISaveEventArguments> OnAfterSave
Event Type
OnBeforeSave
Occurs before records are save in the database.
event EventHandler<ISaveEventArguments> OnBeforeSave