Метод | Описание | |
---|---|---|
CreateIndex ( string name, ClassMapping mapping, ICollection |
Indexes the data for faster queries. Some data sources may not support indexes (such as CSV files), in which case this should throw a NotSupportedException. If the data source supports indexes, but support for creating them is not yet implemented, this should throw a NotImplementedException.
|
|
CreateSequence ( string name ) : void |
Ensures the sequence exists. NOTE: It is not necessary to call this method, as this data store creates sequences on the fly when they are first accessed.
|
|
CreateStoreHouse ( ) : void |
Does nothing. This data store does not support store houses.
|
|
CreateStoreRoom ( ClassMapping mapping ) : void |
Creates the store room specified in the connection descriptor. NOTE: It is not necessary to call this method, as this data store will create the store room on the fly if it does not exist.
|
|
Delete ( ITransaction transaction, ClassMapping mapping, |
Deletes a data object record using the mapping and criteria for what's deleted.
|
|
DeleteIndex ( string name, ClassMapping mapping ) : void |
Removes an index on the data for slower queries (but usually faster inserts/updates/deletes). Some data sources may not support indexes (such as CSV files), in which case this method should be a no-op. If the data source supports indexes, but support for creating them is not yet implemented, this should throw a NotImplementedException.
|
|
DeleteSequence ( string name ) : void |
Removes a sequence. NOTE: This data source creates seuqences on the fly when they are accessed, so this will have the effect that the next access of the sequence will get a "1" rather than the current next value.
|
|
DeleteStoreHouse ( ) : void |
Does nothing. This data store does not support store houses.
|
|
DeleteStoreRoom ( ClassMapping mapping ) : void |
Deletes the store room specified in the connection descriptor. NOTE: This data store will create the store room on the fly when accessed, so this method is effectively the same as just deleting all the records.
|
|
ExecuteQuery ( ITransaction transaction, ClassMapping mapping, IDaQuery query, DataReaderDelegate invokeMe, |
Executes a query and invokes a method with a DataReader of results.
|
|
GenerateClassMappingFromStoreRoom ( string storeRoomName, IComparer |
Uses some form of introspection to determine what data is stored in this data store, and generates a ClassMapping that can be immediately used with a DictionaryDAO. As much data as practical will be populated on the ClassMapping, at a bare minimum the Table (typically set to the storeRoomName passed in, or the more correct or fully qualified version of that name), the TypeName (set to the storeRoomName, since we have no .NET type), and the "data cols" and "obj attrs" will be the list of attributes / columns in the data source, mapped to themselves.
|
|
GetCount ( ITransaction transaction, ClassMapping mapping, |
Gets a count of records for the given criteria, aggregated by the given grouping expressions. This matches "GROUP BY" behavior in SQL.
|
|
GetCount ( ITransaction transaction, ClassMapping mapping, |
Gets a count of records for the given criteria.
|
|
GetLastAutoGeneratedId ( ITransaction transaction, ClassMapping mapping, string idCol ) : object |
Finds the last generated id number for a column.
|
|
GetNextSequenceValue ( ITransaction transaction, string sequenceName ) : int |
Gets the next id number from a sequence in the data source.
|
|
IndexExists ( string name, ClassMapping mapping ) : bool |
Returns whether an index with this name exists or not. NOTE: This does NOT verify what properties the index is on, merely whether an index with this name is already present.
|
|
Insert ( ITransaction transaction, ClassMapping mapping, object>.IDictionary |
Inserts a data object record using the "table" and a list of column/value pairs.
|
|
InsertBatch ( ITransaction transaction, ClassMapping mapping, object>.List |
Inserts a list of data object records of the same type.
|
|
MemoryDaLayer ( IConnectionDescriptor connDesc ) : System |
Create a new memory store.
|
|
SequenceExists ( string name ) : bool |
Returns whether a sequence with this name exists or not.
|
|
StoreHouseMissing ( ) : bool |
Always returns false. This data store does not support store houses.
|
|
StoreRoomMissing ( ClassMapping mapping ) : bool |
Always returns false. This data store will create the storeroom on the fly if it is missing.
|
|
Truncate ( ClassMapping mapping ) : void |
Deletes all contents of the table. Faster for large tables than DeleteAll, but requires greater permissions. For layers that do not support this, the behavior should be the same as calling Delete(null, mapping).
|
|
Update ( ITransaction transaction, ClassMapping mapping, |
Updates a data object record using the "table" and a list of column/value pairs.
|
|
UpdateBatch ( ITransaction transaction, ClassMapping mapping, List |
Updates a list of data object records of the same type.
|
Метод | Описание | |
---|---|---|
GetNextAutoGeneratedId ( ClassMapping mapping, string idCol ) : object |
Finds the next generated id number for a column (for inserts for example).
|
|
GetTable ( ClassMapping mapping ) : MemoryObject>.IDictionary |
public CreateIndex ( string name, ClassMapping mapping, ICollection |
||
name | string | Name of the index. Some data sources require names for indexes, /// and even if not this is required so the index can be deleted if desired. |
mapping | ClassMapping | ClassMapping for the data that is being indexed. |
propertyNames | ICollection |
Names of the data properties to include in the index (in order). |
Результат | void |
public CreateSequence ( string name ) : void | ||
name | string | Name of the new sequence to create. |
Результат | void |
public CreateStoreRoom ( ClassMapping mapping ) : void | ||
mapping | ClassMapping | ClassMapping for the data that will be stored in this room. |
Результат | void |
public Delete ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table from which to delete. |
crit | Criteria for deletion. NOTE: Only the expressions are observed, /// other things (like "order" or start / limit) are ignored. /// WARNING: A null or empty (no expression) criteria will /// delete ALL records! | |
Результат | int |
public DeleteIndex ( string name, ClassMapping mapping ) : void | ||
name | string | Name of the index to delete. |
mapping | ClassMapping | ClassMapping for the data that was being indexed. |
Результат | void |
public DeleteSequence ( string name ) : void | ||
name | string | Name of the sequence to delete. |
Результат | void |
public DeleteStoreRoom ( ClassMapping mapping ) : void | ||
mapping | ClassMapping | ClassMapping for the data that was stored in this room. |
Результат | void |
public ExecuteQuery ( ITransaction transaction, ClassMapping mapping, IDaQuery query, DataReaderDelegate invokeMe, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | Class mapping for the table we're querying against. Optional, /// but not all columns may be properly typed if it is null. |
query | IDaQuery | The query to execute, should have come from CreateQuery. |
invokeMe | DataReaderDelegate | The method to invoke with the IDataReader results. |
parameters | A hashtable containing any values that need to be persisted through invoked method. /// The list of objects from the query will be placed here. | |
Результат | void |
public GenerateClassMappingFromStoreRoom ( string storeRoomName, IComparer |
||
storeRoomName | string | The name of the storeroom (I.E. table). May be null /// if this data source does not use store rooms. |
columnSorter | IComparer |
If you wish the columns / attributes to be in a particular /// order, supply this optional parameter. May be null. |
Результат | ClassMapping |
public GetCount ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table for which to build the query string. |
crit | The criteria to use for "where" comparisons. | |
groupExpressions | ICollection |
The fields/expressions to aggregate on when counting. |
Результат | List |
public GetCount ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table for which to build the query string. |
crit | The criteria to use for "where" comparisons. | |
Результат | int |
public GetLastAutoGeneratedId ( ITransaction transaction, ClassMapping mapping, string idCol ) : object | ||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The class mapping for the table being queried. |
idCol | string | The ID column for which to find the last-generated ID. |
Результат | object |
public GetNextSequenceValue ( ITransaction transaction, string sequenceName ) : int | ||
transaction | ITransaction | The transaction to do this as part of. |
sequenceName | string | The name of the sequence. |
Результат | int |
public IndexExists ( string name, ClassMapping mapping ) : bool | ||
name | string | Name of the index to check for. |
mapping | ClassMapping | ClassMapping for the data that may be indexed. |
Результат | bool |
public Insert ( ITransaction transaction, ClassMapping mapping, object>.IDictionary |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table or other data container we're dealing with. |
propValues | object>.IDictionary | A dictionary of "column"/value pairs for the object to insert. |
Результат | int |
public InsertBatch ( ITransaction transaction, ClassMapping mapping, object>.List |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table or other data container we're dealing with. |
propValueDictionaries | object>.List | A list of dictionaries of column/value pairs. /// Each item in the list should represent the dictionary of column/value pairs for /// each respective object being inserted. |
Результат | void |
public MemoryDaLayer ( IConnectionDescriptor connDesc ) : System | ||
connDesc | IConnectionDescriptor | Connection descriptor to use with this layer. |
Результат | System |
public SequenceExists ( string name ) : bool | ||
name | string | Name of the sequence to check for. |
Результат | bool |
public StoreRoomMissing ( ClassMapping mapping ) : bool | ||
mapping | ClassMapping | |
Результат | bool |
public Truncate ( ClassMapping mapping ) : void | ||
mapping | ClassMapping | |
Результат | void |
public Update ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table or other data container we're dealing with. |
crit | All records matching this criteria will be updated per the dictionary of /// values. | |
propValues | object>.IDictionary | A dictionary of column/value pairs for all non-ID columns to be updated. |
Результат | int |
public UpdateBatch ( ITransaction transaction, ClassMapping mapping, List |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | ClassMapping | The mapping of the table or other data container we're dealing with. |
criteriaList | List |
A list of DaoCriteria. /// Each item in the list should represent the criteria for /// rows that will be updated per the accompanying dictionary. |
propValueDictionaries | object>.List | A list of dictionaries of column/value pairs. /// Each item in the list should represent the dictionary of non-ID column/value pairs for /// each respective object being updated. |
Результат | void |