Click or drag to resize

DynamicQueryEngineBase Class

Central base class for all DynamicQueryEngine classes. Shared logic is placed in this class, which can be overriden in the DynamicQueryEngine classes per database.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesDynamicQueryEngineBase
    More...

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.7.0.0 (5.7.0)
Syntax
public abstract class DynamicQueryEngineBase

The DynamicQueryEngineBase type exposes the following members.

Constructors
  NameDescription
Protected methodDynamicQueryEngineBase
Initializes a new instance of the DynamicQueryEngineBase class.
Protected methodDynamicQueryEngineBase(Boolean, Boolean, Boolean)
Creates a new DynamicQueryEngineBase instance.
Top
Properties
  NameDescription
Public propertyStatic memberCommandTimeOut
Gets / sets the command time out (in seconds). This is a global setting, so every Command object created after you've set this property to a value will have that value as CommandTimeOut. Default is 30 seconds which is the ADO.NET default. Do not set this property directly, but use the methods in the generated code to set this property.
Public propertyCreator
Gets / sets creator
Public propertyDistinctFilteringPreferenceToUse
Gets or sets the distinct filtering preference to use. The default value is the value of the global variable DynamicQueryEngineBase.DistinctFilteringPreferenceDefault.
Public propertyFactoryToUse
Gets the DbProviderFactory to use for this DQE.
Public propertyFunctionMappings
Gets the function mappings for the particular DQE. These function mappings are static and therefore not changeable.
Public propertyPerCallCatalogNameOverwrites
Gets / sets perCallCatalogNameOverwrites name pairs
Public propertyPerCallSchemaNameOverwrites
Gets / sets perCallSchemaNameOverwrites name pairs
Public propertySupportsPackedQueries
Gets whether the database of this DQE supports packed queries, which are queries with multiple SQL statements packed together in a single DbCommand. By default this property returns false.
Top
Methods
  NameDescription
Protected methodAddSingleTargetElementToFromClause
Adds a single target element to from clause. This is used when there's no join to add, but instead a single target. Takes care of hint emitting if required.
Protected methodAppendFieldExpressionAsValueForInsert
Appends the field's expression as value to the specified valueFragments list for the specified insert query. It also appends the parameters to the query as parameters (not anonymized yet)
Protected methodAppendFieldToValueFragmentsForInsert
Appends the field (or its expresssion) to the value fragments of the query specified for insert.
Protected methodAppendFromClause
Appends a FROM clause with the contents of the elements specified to the destination and adds the parameters (if any) to the query to append to.
Protected methodAppendGroupByClause
Appends a GROUP BY clause with the contents of the filter if it's not null / empty, to the fragments object specified. Parameters are added to the query specified
Protected methodAppendOrderByClause
Appends an GROUP BY clause with the contents of the filter if it's not null / empty, to the fragments object specified. Parameters are added to the query specified
Protected methodAppendPostUpdateQueryInBatchFragments
Appends, if required, fragments to the passed in fragments builder, for collecting data right after an update query has executed inside a batch.
Protected methodAppendQueryHints
Appends the hints specified a single prefix hintstring suffix clause to the fragments specified.
Protected methodAppendResultsetFieldsToQuery
Appends all resultset fields to the query specified using the parameters specified and outputs values detected along the way during the process for further query construction.
Protected methodAppendUnionedQueries
Appends, if specified, the unioned queries to the fragments specified, wrapping nested queries in () if necessary. Parameters are appneded to query.
Protected methodAppendUpdateSetClauses(IListIEntityFieldCore, IListIFieldPersistenceInfo, QueryFragments, IList)
Appends set clauses for an update query using the input specified to the destination list specified
Protected methodAppendUpdateSetClauses(IListIEntityFieldCore, IListIFieldPersistenceInfo, QueryFragments, IList, Boolean)
Appends set clauses for an update query using the input specified to the destination list specified
Protected methodAppendWhereClause
Appends a WHERE clause with the contents of the filter if it's not null / empty, to the fragments object specified. Parameters are added to the query specified
Protected methodCheckIfFieldNeedsInsertAction
Checks the if field needs insert action.
Protected methodStatic memberCheckSelectListAndPersistenceInfoForSelect
Checks the specified select list and fieldspersistenceinfo and throws exceptions when an inconsistency is detected.
Protected methodConstructFieldsToUpdateList
Constructs the list of fields to update plus its corresponding fieldpersistenceinfo list.
Protected methodCreateActionQueryFromSQL
Creates the action query from the sql query specified using the parameter values specified.
Protected methodCreateCommand
Creates the command.
Protected methodCreateCommand(DbConnection)
Creates a new DbCommand object and initializes it
Protected methodCreateCommand(String)
Creates a new DbCommand object and initializes it
Protected methodCreateCommand(String, DbConnection)
Creates a new DbCommand object and initializes it
Protected methodCreateDbSpecificCreator
Creates a new IDbSpecificCreator and initializes it
Public methodCreateDeleteDQ(IFieldPersistenceInfo, DbConnection, ListIPredicate)
Creates a new Delete Query object which is ready to use.
Public methodCreateDeleteDQ(IFieldPersistenceInfo, DbConnection, ListIPredicate, IPredicate, IRelationCollection)
Creates a new Delete Query object which is ready to use.
Public methodCreateInsertDQ(IEntityFields, DbConnection)
Creates a new Insert Query object which is ready to use.
Public methodCreateInsertDQ(IEntityFieldCore, IFieldPersistenceInfo, DbConnection)
Creates a new Insert Query object which is ready to use.
Protected methodCreatePagingSelectDQ
Creates a new Select Query which is ready to use, based on the query parameters specified.
Protected methodCreateRealQueryAndParameters
Creates the real sql query to execute from the query in string form and the parameters specified. It updates 'query' with the constructed string and real DbParameter instances.
Protected methodCreateRetrievalQueryFromSQL
Creates the retrieval query from the SQL query specified using the parameter values specified and is configured with the aspects specified.
Public methodCreateRowCountDQ
Creates a select query which will be executed as a scalar, and which will return a single value, the number of rows in the query formed by the elements passed in.
Public methodCreateSelectDQ
Creates a new Select Query which is ready to use, based on the specified select list and the specified set of relations. If selectFilter is set to null, all rows are selected.
Protected methodCreateSelectDQImpl
Creates a new Select Query which is ready to use, based on the specified elements.
Protected methodCreateSingleTargetDeleteDQ(IFieldPersistenceInfo, IActionQuery, IPredicate)
Creates a new Delete Query object which is ready to use.
Protected methodCreateSingleTargetDeleteDQ(IFieldPersistenceInfo, IActionQuery, IPredicate, IRelationCollection)
Creates a new Delete Query object which is ready to use.
Protected methodCreateSingleTargetDeleteDQUsingCorrelatedSubQuery
Creates a new Delete Query object which is ready to use.
Protected methodCreateSingleTargetDeleteDQUsingKeywordClause
Creates a new Delete Query object which is ready to use. Uses keyword clause (using keyword FROM/USING etc.)) for filtering
Protected methodCreateSingleTargetInsertDQ
Creates a new Insert Query object which is ready to use.
Protected methodCreateSingleTargetUpdateDQ(IEntityFieldCore, IFieldPersistenceInfo, IActionQuery, IPredicate)
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore fields are included in the update query. Primary Key fields are never updated.
Protected methodCreateSingleTargetUpdateDQ(IEntityFieldCore, IFieldPersistenceInfo, IActionQuery, IPredicate, IRelationCollection)
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore are included in the update query. Primary Key fields are never updated.
Protected methodCreateSingleTargetUpdateDQUsingCorrelatedSubQuery
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore are included in the update query. Primary Key fields are never updated. Uses a correlated subquery for filtering
Protected methodCreateSingleTargetUpdateDQUsingFromClause
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore are included in the update query. Primary Key fields are never updated. Uses a FROM clause for filtering
Protected methodCreateSubqueryConnectionClausesDelete
Produces a set of WHERE Clauses to use in the DELETE queries which have filters spanning multiple entities. It produces one clause if it finds the deleteTable on the PK side and then stops and it produces n clauses if it finds deleteTable on the FK side of n relations in relationsToWalk. If the deleteTable is on the PK side, it produces a clause: deleteTableAlias.PKField1 = deleteTable.PKField1 AND... (for each field in the PK 1 clause) If the deleteTable is on the FK side, it produces deleteTableAlias.Field1 = relatedEntityTable.Field1 AND ... clauses for each relation the table of the persistence info is in.
Protected methodCreateSubqueryConnectionClausesUpdate
Produces a set of WHERE Clauses to use in the UPDATE queries which have filters spanning multiple entities. It produces one clause if it finds the updateTable on the PK side and then stops and it produces n clauses if it finds updateTable on the FK side of n relations in relationsToWalk. If the updateTable is on the PK side, it produces a clause: updatedTableAlias.PKField1 = updateTable.PKField1 AND... (for each field in the PK 1 clause) If the updateTable is on the FK side, it produces updatedTableAlias.Field1 = relatedEntityTable.Field1 AND ... clauses for each relation the table of the persistence info is in.
Protected methodCreateTvfCallQuery
Creates a retrieval query for the tvfcall specified.
Protected methodCreateTvfFunctionNameFragmentList
Creates the TVF function name fragment list. By default it will create 'FunctionName(parameterList)'. Override this method if the DQE requires a different strategy to call a TVF, e.g. wrapping it.
Public methodCreateUpdateDQ(IEntityFields, DbConnection, ListIPredicate)
Creates a new Update Query object which is ready to use. Only 'changed' EntityFields are included in the update query. Primary Key fields are never updated.
Public methodCreateUpdateDQ(IEntityFieldCore, IFieldPersistenceInfo, DbConnection, ListIPredicate)
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore fields are included in the update query.
Public methodCreateUpdateDQ(IEntityFields, DbConnection, ListIPredicate, IPredicate, IRelationCollection)
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore are included in the update query. Primary Key fields are never updated.
Public methodCreateUpdateDQ(IEntityFieldCore, IFieldPersistenceInfo, DbConnection, ListIPredicate, IPredicate, IRelationCollection)
Creates a new Update Query object which is ready to use. Only 'changed' EntityFieldCore are included in the update query. Primary Key fields are never updated.
Protected methodDetermineIfDuplicatesWillOccur
Determines if duplicates will occur.
Protected methodDetermineIfFieldAliasIsRequired
Determines if field alias is required.
Protected methodDetermineObjectAliasToUseForSelectListField
Determines the object alias to use for select list field.
Protected methodDetermineTargetAlias
Determines the target alias to use for a single target FROM clause.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetCorrectFieldTypeBasedOnTypeSpecs
Gets the correct field type, based on the type and lenght specified in the specified persistenceInfo
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNewCatalogName
Gets the new name for the catalog, given the current name. If the current name is not found in the list of catalog name overwrites, the current name is returned. This routine works on the catalog names specified in the config file.
Public methodGetNewPerCallSequenceName
Gets the new name of the sequence passed in. Default implementation overwrites schema name with a new name if the name has been defined for overwriting. Works on the PerCallSchemaNameOverwrites set.
Public methodGetNewPerCallStoredProcedureName
Gets the new name of the stored procedure passed in. Overwrites schema and catalog name with a new name if these names have been defined for overwriting. This routine works on the PerCallCatalogNameOverwrites and PerCallSchemaNameOverwrites names specified on this instance
Public methodGetNewSchemaName
Gets the new name for the schema, given the current name. If the current name is not found in the list of schema name overwrites, the current name is returned. This routine works on the schema names specified in the config file.
Public methodGetNewSequenceName
Gets the new name of the sequence passed in. Default implementation overwrites schema name with a new name if the name has been defined for overwriting.
Public methodGetNewStoredProcedureName
Gets the new name of the stored procedure passed in. Overwrites schema and catalog name with a new name if these names have been defined for overwriting. This routine works on the catalog and schema names specified in the config file.
Protected methodGetNullInProjectionFragment
Gets the fragment to use in a projection for a literal NULL. By default this is 'NULL', but some databases need extra processing around NULL. Do to so, override this method.
Protected methodGetTvfFunctionNameToUse
Gets the table valued function name to use. By default it creates an object name from the elements specified like a table name.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodHandleDistinctEmit
Handles the emit of 'DISTINCT' into the query text and returns true if distinct was emitted or false if not.
Protected methodMakeParametersAnonymous(DbCommand)
Makes the parameters anonymous in the passed in query. An anonymous parameter is '?', not '@foo'. It walks all parameters and replaces the names of these parameters with "?" in the query text
Protected methodMakeParametersAnonymous(String, IList)
Makes the parameters anonymous in the passed in query. An anonymous parameter is '?', not '@foo'. It walks all parameters and replaces the names of these parameters with "?" in the query text
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodPrepareQueryForBatchUpdates
Prepares, if necessary, the passed in query object for a batch update query. Use this method to e.g. create an output parameter which collects the number of rows affected.
Protected methodReAssembleFragments
Reassembles the fragments specified, with separting '.'. If a fragment is empty, it's skipped
Protected methodReAssembleStoredProcedureNameFragments
Re-assembles the stored procedure name from the fragments specified
Protected methodResetCreator
Resets the creator object with a new one. Only used by DAO objects which keep a Dynamic Query Engine object alive.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodUpdateAliasInUpdateTablePredicates
Updates the SourceAlias in the predicates in updateFilter to the alias updatedTableAlias if the predicate targets the entity name specified.
Protected methodWrapCommandInPagingQuery
Wraps the command in the query specified in a paging query and adds necessary parameters to the command.
Protected methodWrapQueryInBeginEndIfNecessary
Wraps the passed in query if necessary. By default it returns the toWrap string without doing any processing.
Top
Fields
  NameDescription
Public fieldStatic memberDeleteQueryBufferLength
Length of buffer in which Delete queries are generated
Public fieldStatic memberDistinctFilteringPreferenceDefault
The distinct filtering preference to use for all DQE instances.
Public fieldStatic memberInsertQueryBufferLength
Length of buffer in which Insert queries are generated
Public fieldStatic memberSelectJoinQueryBufferLength
Length of buffer in which Join constructs for select queries are generated
Public fieldStatic memberSelectQueryBufferLength
Length of buffer in which Select queries are generated
Public fieldStatic memberSelectResultSetBufferLength
Length of buffer in which resultset definitions for select queries are generated
Public fieldStatic memberSwitch
The traceswitch used in the DQE. Set in the static constructor of the derived class.
Public fieldStatic memberUpdateQueryBufferLength
Length of buffer in which Update queries are generated
Top
See Also
Inheritance Hierarchy