Property | Type | Description | |
---|---|---|---|
_connDesc | |||
_fullyQualifyColumnNames | System.Boolean | ||
_sqlQueryCache | ClearingCache |
Method | Description | |
---|---|---|
AppendParameter ( |
Since it is implementation-dependent whether to use the sql parameters collection or not, this method should be implemented in each implementation.
|
|
CreateQuery ( ClassMapping mapping, |
Builds the query based on a serializable criteria.
|
|
CreateQuery ( string queryStr, IEnumerable queryParams, ClassMapping mapping ) : IDaQuery |
Builds the query based on a string, such as a sql string. NOTE: Not all FastDaoLayers are required to support this, if it is not supported a NotSupportedException will be thrown. TODO: This will be removed when FastDAO.QueryFor and IterateOverObjects that take strings are removed.
|
|
Delete ( ITransaction transaction, ClassMapping mapping, |
||
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, ClassMapping mapping, IDaQuery query, DataReaderDelegate invokeMe, |
||
ExpressionsToQuery ( |
Takes a DaoCriteria, converts it to a " WHERE ..." chunk of SQL. The SQL will begin with a space if non-empty.
|
|
GetCount ( ITransaction transaction, ClassMapping mapping, |
||
GetCount ( ITransaction transaction, ClassMapping mapping, |
||
GetLastAutoGeneratedId ( ITransaction transaction, ClassMapping mapping, string idCol ) : object | ||
GetNextSequenceValue ( ITransaction transaction, string sequenceName ) : int | ||
GroupBysToEndOfQuery ( |
Adds the group by fields to the end of the query, including the keyword "GROUP BY" if necessary.
|
|
GroupBysToStartOfQuery ( |
Adds the group by fields to the "column" list ("column" since they may not all be columns) in the beginning of the select (I.E. "SELECT COUNT(*), Field1, Field2, etc).
|
|
Insert ( ITransaction transaction, ClassMapping mapping, object>.IDictionary |
||
OrdersToQuery ( |
Takes a DaoCriteria, converts it to an " ORDER BY ..." chunk of SQL. The SQL will begin with a space if non-empty.
|
|
ReadScalarValue ( |
||
SetFullyQualifyColumnNames ( bool fullyQualifyColumnNames ) : void |
Sometimes it is not desirable to fully qualify column names, even for a database, e.g. when doing a query that is a join of foreign tables. This allows this value to be set in those instances.
|
|
SqlDaLayer ( |
Instantiates the data access layer with the connection descriptor for the DB.
|
|
Truncate ( ClassMapping classMap ) : void | ||
Update ( ITransaction transaction, ClassMapping mapping, |
Method | Description | |
---|---|---|
BoolTypeToString ( BooleanOperator boolType ) : string |
Returns a nicely spaced AND or OR depending on the boolean type.
|
|
ExpressionListToQuery ( |
Converts the list of expressions from this criteria into SQL, and appends to the given string builder.
|
|
ExpressionToQuery ( |
Converts a single Expression to SQL (mapping the columns as appropriate) and appends to the given string builder. Remember to wrap the SQL in parends if necessary.
|
|
GetGroupByValue ( ClassMapping mapping, IDataReader reader, int number, |
Reads a single "group by" field value from the data reader, coerces it to the correct type if necessary/possible, and returns it.
|
|
GetValueStrings ( string table, object>.IDictionary |
||
OrderListToSql ( StringBuilder orderClauseToAddTo, |
Converts the list of SortOrders from this criteria into SQL, and appends to the given string builder.
|
|
PreProcessPropertyValues ( string table, object>.IDictionary |
Override this method if you need to do any work to convert values from the object's properties into normal SQL parameters. Default implementation does nothing. This is called prior to inserting or updating these values in the table.
|
|
ReadGroupByCount ( |
Reads the results from the data reader produced by the group by query, creates the GroupCountResults, and returns them in the parameters collection.
|
public AppendParameter ( |
||
queryToAddTo | Query to add the parameter to. | |
value | object | Actual value that we need to append to our SQL. |
columnType | Type of data actually stored in the DB column. For example, /// Enums may be stored as strings. May be null if no type cast /// is necessary. | |
return | void |
protected static BoolTypeToString ( BooleanOperator boolType ) : string | ||
boolType | BooleanOperator | |
return | string |
public CreateQuery ( ClassMapping mapping, |
||
mapping | ClassMapping | The mapping of the table for which to build the query string. |
crit | The criteria to use for "where" comparisons. | |
return | IDaQuery |
public CreateQuery ( string queryStr, IEnumerable queryParams, ClassMapping mapping ) : IDaQuery | ||
queryStr | string | The sql statement to execute that is expected to return a large /// number of rows. |
queryParams | IEnumerable | The parameters for the sql statement. If there are none, this /// can be null. |
mapping | ClassMapping | The mapping of the table for which to build the query string. |
return | IDaQuery |
public Delete ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | |
mapping | ClassMapping | |
crit | ||
return | int |
public DisposeOfQuery ( IDaQuery query ) : void | ||
query | IDaQuery | Query you're done using. |
return | void |
public ExecuteQuery ( ITransaction transaction, ClassMapping mapping, IDaQuery query, DataReaderDelegate invokeMe, |
||
transaction | ITransaction | |
mapping | ClassMapping | |
query | IDaQuery | |
invokeMe | DataReaderDelegate | |
parameters | ||
return | void |
protected ExpressionListToQuery ( |
||
queryToAddTo | Query we're adding the expression to. | |
boolType | BooleanOperator | Whether to AND or OR the expressions together. |
expressions | IEnumerable |
The expressions to add to the query. |
mapping | ClassMapping | Class mapping for the class we're dealing with. |
colPrefix | string | What to prefix column names with, I.E. "Table." for "Table.Column". /// May be null if no prefix is desired. May be something other than /// the table name if the tables are being aliased. |
return | void |
protected ExpressionToQuery ( |
||
queryToAddTo | Query we're adding the expression to. | |
expr | IExpression | The expression. NOTE: It should NOT be null. This method does not check. |
mapping | ClassMapping | Class mapping for the class we're dealing with. |
colPrefix | string | What to prefix column names with, I.E. "Table." for "Table.Column". /// May be null if no prefix is desired. May be something other than /// the table name if the tables are being aliased. |
booleanOperator | string | The boolean operator (AND or OR) to insert before /// this expression. Blank ("") if we don't need one. |
return | bool |
public ExpressionsToQuery ( |
||
queryToAddTo | Query we're adding the expression to. | |
crit | Serializable critera to get the expressions from. | |
mapping | ClassMapping | Class mapping for the class we're dealing with. |
return | void |
public GetCount ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | |
mapping | ClassMapping | |
crit | ||
groupExpressions | ICollection |
|
return | List |
public GetCount ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | |
mapping | ClassMapping | |
crit | ||
return | int |
protected GetGroupByValue ( ClassMapping mapping, IDataReader reader, int number, |
||
mapping | ClassMapping | Mapping of class fields / names / etc. |
reader | IDataReader | Data reader to get the value from. |
number | int | Which group by field is this (0th, 1st, etc). |
expression | The group by expression we're reading the value for. | |
return | object |
public GetLastAutoGeneratedId ( ITransaction transaction, ClassMapping mapping, string idCol ) : object | ||
transaction | ITransaction | |
mapping | ClassMapping | |
idCol | string | |
return | object |
public GetNextSequenceValue ( ITransaction transaction, string sequenceName ) : int | ||
transaction | ITransaction | |
sequenceName | string | |
return | int |
protected GetValueStrings ( string table, object>.IDictionary |
||
table | string | |
propValues | object>.IDictionary | |
return | string>.IDictionary |
public GroupBysToEndOfQuery ( |
||
query | Query to append to. | |
groupExpressions | ICollection |
Group by expressions. |
mapping | ClassMapping | Class mapping for the class we're dealing with. |
return | void |
public GroupBysToStartOfQuery ( |
||
query | Query to append to. | |
groupExpressions | ICollection |
Group by expressions. |
mapping | ClassMapping | Class mapping for the class we're dealing with. |
return | void |
public Insert ( ITransaction transaction, ClassMapping mapping, object>.IDictionary |
||
transaction | ITransaction | |
mapping | ClassMapping | |
propValues | object>.IDictionary | |
return | int |
protected OrderListToSql ( StringBuilder orderClauseToAddTo, |
||
orderClauseToAddTo | StringBuilder | |
crit | ||
mapping | ClassMapping | |
return | void |
public OrdersToQuery ( |
||
queryToAddTo | ||
crit | ||
mapping | ClassMapping | |
return | void |
protected PreProcessPropertyValues ( string table, object>.IDictionary |
||
table | string | The table these values will be inserted or updated into. |
propValues | object>.IDictionary | A dictionary of "column"/value pairs for the object to insert or update. |
return | void |
protected ReadGroupByCount ( |
||
parameters | Input and output parameters for the method. | |
reader | IDataReader | Data reader to read from. |
return | void |
public ReadScalarValue ( |
||
parameters | ||
reader | IDataReader | |
return | void |
public SetFullyQualifyColumnNames ( bool fullyQualifyColumnNames ) : void | ||
fullyQualifyColumnNames | bool | Whether or not to fully qualify column names. |
return | void |
public SqlDaLayer ( |
||
connDesc | 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. |
return | System |
public Truncate ( ClassMapping classMap ) : void | ||
classMap | ClassMapping | |
return | void |
public Update ( ITransaction transaction, ClassMapping mapping, |
||
transaction | ITransaction | |
mapping | ClassMapping | |
crit | ||
propValues | object>.IDictionary | |
return | int |
protected AbstractSqlConnectionDescriptor,Azavea.Open.DAO.SQL _connDesc | ||
return |
protected Boolean,System _fullyQualifyColumnNames | ||
return | System.Boolean |