Свойство | Type | Description | |
---|---|---|---|
_coerceableTypes | TypeCoercionDelegate>.Dictionary | ||
_connDesc | IConnectionDescriptor | ||
_log | log4net.ILog |
Méthode | Description | |
---|---|---|
AddCoercibleType ( |
A method to add a coercion delegate for a type, without exposing the dictionary.
|
|
CoerceType ( |
Attempts to convert the value into the given type. While broadly similar to Convert.ChangeType, that method doesn't support enums and this one does. Calling that from within this method makes it take nearly twice as long, so this method does its own type checking.
|
|
CreateQuery ( |
Builds the query based on a serializable criteria. The Query object is particular to the implementation, but may contain things like the parameters parsed out, or whatever makes sense to this FastDaoLayer. You can think of this method as a method to convert from the generic DaoCriteria into the specific details necessary for querying.
|
|
Delete ( ITransaction transaction, |
Deletes a data object record using the mapping and criteria for what's deleted.
|
|
DisposeOfQuery ( IDaQuery query ) : void |
Should be called when you're done with the query. Allows us to cache the objects for reuse.
|
|
ExecuteQuery ( ITransaction transaction, |
Executes a query and invokes a method with a DataReader of results.
|
|
GetCount ( ITransaction transaction, |
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, |
Gets a count of records for the given criteria.
|
|
GetLastAutoGeneratedId ( ITransaction transaction, |
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.
|
|
Insert ( ITransaction transaction, |
Inserts a data object record using the "table" and a list of column/value pairs.
|
|
InsertBatch ( ITransaction transaction, |
Inserts a list of data object records of the same type. The default implementation merely calls Insert for each one, however some datasources may have more efficient ways of inserting multiple records that the appropriate DaLayer will take advantage of.
|
|
SupportsNumRecords ( ) : bool |
If true, methods that return numbers of records affected will be returning accurate numbers. If false, they will return UNKNOWN_NUM_ROWS.
|
|
Truncate ( |
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, |
Updates a data object record using the "table" and a list of column/value pairs.
|
|
UpdateBatch ( ITransaction transaction, |
Updates a list of data object records of the same type. The default implementation merely calls Update for each one, however some datasources may have more efficient ways of inserting multiple records that the appropriate DaLayer will take advantage of.
|
Méthode | Description | |
---|---|---|
AbstractDaLayer ( IConnectionDescriptor connDesc, bool supportsNumRecords ) : System |
Instantiates the data access layer with the connection descriptor for the DB.
|
|
GetDataType ( string col, |
Given the class mapping and the column name, determines the appropriate c# data type.
|
protected AbstractDaLayer ( IConnectionDescriptor connDesc, bool supportsNumRecords ) : System | ||
connDesc | IConnectionDescriptor | The connection descriptor that is being used by this FastDaoLayer. |
supportsNumRecords | bool | If true, methods that return numbers of records affected will be /// returning accurate numbers. If false, they will probably return /// FastDAO.UNKNOWN_NUM_ROWS. |
Résultat | System |
public AddCoercibleType ( |
||
t | The type to coerce. | |
coercionDelegate | TypeCoercionDelegate | How to coerce it. |
Résultat | void |
public CoerceType ( |
||
desiredType | Type we need the value to be. | |
input | object | Input value, may or may not already be the right type. |
Résultat | object |
public abstract CreateQuery ( |
||
mapping | The mapping of the table for which to build the query string. | |
crit | The criteria to use to find the desired objects. | |
Résultat | IDaQuery |
public abstract Delete ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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! | |
Résultat | int |
public abstract DisposeOfQuery ( IDaQuery query ) : void | ||
query | IDaQuery | Query you're done using. |
Résultat | void |
public abstract ExecuteQuery ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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. | |
Résultat | void |
public abstract GetCount ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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. |
Résultat | List |
public abstract GetCount ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | The mapping of the table for which to build the query string. | |
crit | The criteria to use for "where" comparisons. | |
Résultat | int |
protected GetDataType ( string col, |
||
col | string | Column to look up. |
mapping | Mapping for the class we're creating a table for. | |
Résultat |
public abstract GetLastAutoGeneratedId ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | The class mapping for the table being queried. | |
idCol | string | The ID column for which to find the last-generated ID. |
Résultat | object |
public abstract GetNextSequenceValue ( ITransaction transaction, string sequenceName ) : int | ||
transaction | ITransaction | The transaction to do this as part of. |
sequenceName | string | The name of the sequence. |
Résultat | int |
public abstract Insert ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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. |
Résultat | int |
public InsertBatch ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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. |
Résultat | void |
public abstract Truncate ( |
||
mapping | ||
Résultat | void |
public abstract Update ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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. |
Résultat | int |
public UpdateBatch ( ITransaction transaction, |
||
transaction | ITransaction | The transaction to do this as part of. |
mapping | 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. |
Résultat | void |
protected Dictionary |
||
Résultat | TypeCoercionDelegate>.Dictionary |
protected IConnectionDescriptor _connDesc | ||
Résultat | IConnectionDescriptor |