Click or drag to resize

DBDriverBase Class

Abstract base class for implementation of Database Drivers for the LLBLGen Pro system.
Inheritance Hierarchy

Namespace:  SD.LLBLGen.Pro.DBDriverCore
Assembly:  SD.LLBLGen.Pro.DBDriverCore (in SD.LLBLGen.Pro.DBDriverCore.dll) Version: 5.8.0.0 (5.8.21.0208)
Syntax
public abstract class DBDriverBase : DBElementBase, 
	ICloneable

The DBDriverBase type exposes the following members.

Constructors
  NameDescription
Protected methodDBDriverBase
CTor
Top
Properties
  NameDescription
Protected propertyActiveCatalog
Gets the active catalog.
Public propertyConnectionElements
Gets the list of connection elements to use to build a connection string.
Public propertyCreatedByDesigner
Gets or sets a value indicating whether this element is created by the designer from mappings (true) or that it was created from meta-data retrieved from the database (false, default).
(Inherited from DBElementBase.)
Public propertyCustomProperties
Gets the Custom properties (name - value pairs) read from the schema.
(Inherited from DBElementBase.)
Public propertyDBDriverCopyright
Gets the copyright string for this driver
Public propertyDBDriverID
Returns the driver ID which can be used to identify this driver with a specified driver in a driver.config file.
Public propertyDBDriverType
Returns the string representation of the type of this driver, e.g. LLBLGen Pro database driver for SQLServer.
Public propertyDBDriverVendor
Returns the name of the vendor of this driver, e.g. Solutions Design.
Public propertyDBDriverVersion
Returns the string representation of the version of this driver, e.g. 1.0 Beta.
Public propertyDBTypesAsNETType
Gets the dbtypes to .NET type conversiontable
Public propertyDBTypesAsProviderType
Gets the dbtypes to provider type conversiontable
Public propertyDBTypesAsString
Gets the dbtypes to string conversiontable
Public propertyDefaultValuePerTypeForParameters
Gets the default value per type for parameters. As types, all value types in the supported set of types are included plus string. The values are used for parameters for stored procedure calls for resultset retrieval.
Protected propertyDeserializing
Gets or sets a value indicating whether this instance is deserializing.
(Inherited from DBElementBase.)
Public propertyErrorLog
Gets the complete ErrorLog for this object.
(Inherited from DBElementBase.)
Public propertyFullName
Gets the full name.
(Inherited from DBElementBase.)
Public propertyFullNameForXml
Gets the full name for XML. This is a name which has the format schemaname:elementname or schemaname:elementname:fieldname. Used for references.
(Inherited from DBElementBase.)
Public propertyFullNameForXmlWithCatalog
Gets the full name for XML. This is a name which has the format catalogname:schemaname:elementname or catalogname:schemaname:elementname:fieldname. Used for references.
(Inherited from DBElementBase.)
Public propertyMajorServerVersionNumber
Gets the major server version number.
Public propertyMarkedForDeletion
Gets or sets a value indicating whether this element is marked for deletion.
(Inherited from DBElementBase.)
Public propertyMinorServerVersionNumber
Gets the minor server version number.
Public propertyNETToDBTypeConversions
Gets the .NET to DB type conversions.
Public propertyRdbmsFunctionalityAspects
Returns the array list with RdbmsFunctionalityAspect specifications the database represented by this driver can perform.
Public propertyServerVersion
Gets the server version.
Protected propertySortOrderPerDBType
Gets the list of sortorder (value) per dbtype (key)
Public propertySupportsCatalogs
Gets a value indicating whether the database of this driver supports the concept of a catalog
Protected propertySupportsCommandTimeout
Gets a value indicating whether this driver supports command timeouts. Firebird for example doesn't support command timeouts. Default implementation returns true;
Public propertySupportsMultipleCatalogs
Gets a value indicating whether the database of this driver supports multiple catalogs
Public propertySupportsMultipleSchemas
Gets a value indicating whether the database of this driver supports the concept of multiple schemas, either at the server level or at the catalog level.
Public propertySupportsSchemas
Gets a value indicating whether the database of this driver supports the concept of schemas. Schemas are always supported if catalogs are supported.
Protected propertyTypeOfDBElement
Gets the type of DB element in the form of a ContainedElementType value.
(Overrides DBElementBaseTypeOfDBElement.)
Top
Methods
  NameDescription
Public methodCheckIfFkConstraintCanBeCreated
Checks if an fk constraint can be created between the fk side and the pk side specified.
Public methodClone
Clones this instance and shallow clones the connection elements
Public methodConstructConnectionString
Constructs a valid connection string from the ConnectionElements specified in this driver instance.
Public methodConstructConnectionString(DictionaryConnectionElement, String)
Constructs a valid connection string from the ConnectionElements specified.
Public methodConvertDBTypeToDBNETProviderType
Converts the passed in db type to the name of the type in the .NET provider specific enum.
Public methodConvertDBTypeToNETType
Converts the passed in db type to its .NET type
Public methodConvertDBTypeToString
Converts the db type to a string value
Protected methodConvertElementNameToString
Creates a string representation of the element specified for SQL query purposes.
Protected methodConvertSchemaElementToFullNameForSqlQuery
Converts the specified element to a full name to be used in a sql query. E.g. [catalog].[schema].[tablename] for sql server. It uses the WrapIdentifier method to create fragments for catalog/schema/table name (or view name). Override this method if the database doesn't support catalogs or schemas.
Public methodConvertStringToDBType
Converts the name specified to a DBType value.
Public methodCreateCatalogRetriever
Produces the DBCatalogRetriever instance to use for retrieving meta-data of a catalog.
Public methodCreateCommand(String)
Creates a new command with the query set as command text and a new connection object set as its connection. It sets the command timeout to the static command time set in the DDDriverbase class
Public methodCreateCommand(DbConnection, String)
Creates a new command with the query set as command text and the connection passed in set as its connection. It sets the command timeout to the static command time set in the DDDriverbase class
Public methodCreateConnection
Creates a connection object using the factory and sets the connection string
Public methodCreateConnectionDataCollector
Creates the connectiondata object to be used to obtain the required information for connecting to the database.
Public methodCreateDataAdapter(DbCommand)
Creates a new data adapter with the connection specified and the query specified as the select query for the select command
Public methodCreateDataAdapter(String)
Creates a new data adapter with the connection specified and the query specified as the select query for the select command
Public methodCreateDataAdapter(DbConnection, String)
Creates a new data adapter with the connection specified and the query specified as the select query for the select command
Public methodStatic memberCreateDBDriverInstance
Creates an instance of the given class in the given namespace, loaded from the given assembly. Bubbles all exceptions up.
Public methodCreateParameter(DbCommand, DBStoredProcedureParameter)
Creates a new db parameter based on the passed in DBStoredProcedureParameter
Public methodCreateParameter(DbCommand, String, Object)
Creates a new parameter with the value specified. It's a different implementation as the other overloads: this overload doesn't set the DbType nor the size explicitly. Some providers need that like Sybase.
Public methodCreateParameter(DbCommand, String, DbType, Int32)
Creates a new parameter with the values specified and adds it to the parameter collection of the command specified
Public methodCreateParameter(DbCommand, String, DbType, Int32, Object)
Creates a new parameter with the values specified and adds it to the parameter collection of the command specified
Protected methodCreateSelectAllQuery
Creates a SELECT fieldlist FROM elementname query where SELECT and FROM are placed on a new line. No CRLF is appended nor a query separator.
Protected methodCreateSelectTop100Query
Creates a SELECT top 100 query for the element specified. The default implementation appends "LIMIT 100" to the result of CreateSelectAlLQuery. The LIMIT 100 is appended on a new line.
Public methodCreateStoredProcCallCommand(String)
Creates a new command with the stored procedure call as the command text and a new connection object set as its connection. It sets the command timeout to the static command time set in the DDDriverbase class.
Public methodCreateStoredProcCallCommand(DbConnection, String)
Creates a new command with the stored procedure call as the command text and the connection object passed in as its connection. It sets the command timeout to the static command time set in the DDDriverbase class.
Protected methodCreateTVFCallStatementForSql
Creates a TVF call statement to be used in a sql statement. Parameters are hard-coded with their names, and not values.
Public methodDBTypeIsNumeric
Returns true if the passed in type is a numeric type.
Public methodDBTypeRequiresInsertValue
Returns true if the specified type requires a value specified in Insert queries. Not all RDBMS's require for each type a value. F.e. SqlServer doesn't require a value for Timestamp types, SqlServer will insert a value automatically.
Public methodDBTypeSupportsPrecision
Returns whether the specified dbtype supports a precision. By default false is returned.
Public methodDBTypeSupportsScale
Returns whether the specified dbtype supports a scale. By default false is returned.
Protected methodDeserializeAdditionalAttributes
Deserializes attributes of this element's base class from the reader.
(Inherited from DBElementBase.)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from DBElementBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExecuteSqlString
Executes the string specified as one or more queries and returns the results in a list of sqlexecutionresults, one per query executed.
Public methodExecuteWithActiveRecoveryStrategy(Action)
Executes the specified action with the active recovery strategy on this driver. If no recovery strategy is specified it will execute the action directly
Public methodExecuteWithActiveRecoveryStrategyT(FuncT)
Executes the specified func with the active recovery strategy on this driver. If no recovery strategy is specified it will execute the func directly
Protected methodFillDbTypeConvertArrays
Fills the db type arrays for various conversions
Protected methodFillDBTypeSortOrderList
Fills the DB type sort order list.
Protected methodFillNETToDBTypeConversionsList
Fills the NET to DB type conversions list.
Protected methodFillRdbmsFunctionalityAspects
Fills the RDBMS functionality aspects list.
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.)
Public methodGenerateSqlQueriesForElements
Generates a string with for each element in sourceElementsToUse a sql query of the statementtype specified, separated by the genuine separator for the database type, or an empty line if there's no separator known (e.g. MS Access).
Public methodGetAllCatalogNames
Gets all catalog names from the database system connected through the specified connection elements set.
Public methodGetAllSchemaNames
Gets all schema names from the catalog with the name specified in the database system connected through the specified connection elements set.
Public methodGetAllStoredProcedureNames
Gets all stored procedure names in the schema in the catalog specified in the database system connected through the specified connection elements set.
Public methodGetAllSynonymNames
Gets all synonym names (with the target type, if applicable) in the schema in the catalog specified in the database system connected through the specified connection elements set.
Public methodGetAllSystemSequences
Gets all system sequence instances for the database targeted. System sequences are sequences which are system wide, like @@IDENTITY.
Public methodGetAllTableNames
Gets all table names in the schema in the catalog specified in the database system connected through the specified connection elements set.
Public methodGetAllTableValuedFunctionNames
Gets all table valued function names in the schema in the catalog specified in the database system connected through the specified connection elements set.
Public methodGetAllViewNames
Gets all view names in the schema in the catalog specified in the database system connected through the specified connection elements set.
Public methodGetCompatibleDBTypeDefinitionsForNetType(Type, Int32, Int32, Int32)
Gets a List of all DBTypeDefinition instances which are compatible with the type specific information passed in. The first DBTypeSpecification is the default type specification to user.
Public methodGetCompatibleDBTypeDefinitionsForNetType(Type, Int32, Int32, Int32, String)
Gets a List of all DBTypeDefinition instances which are compatible with the type specific information passed in. The first DBTypeSpecification is the default type specification to user.
Public methodGetConnectionStringToUse
Gets the connection string to use.
Protected methodGetCurrencyTypes
Gets the currency types for this driver. Used for optimizing the SortOrder per db type.
Public methodGetDbProviderFactory
Gets the db provider factory to use
Protected methodGetDbProviderFactoryInvariantNames
Gets the DbProviderFactory invariant names to use for the factory. The first one which is found is used.
Public methodGetDbTypeAsEnumStringValue
Gets the string value of the db type passed in, from the Enum specification used in this driver for type specification
Protected methodGetDecimalTypes
Gets the decimal types for this driver. Used for optimizing the SortOrder per db type.
Public methodGetDefaultCatalogName
Gets the default name to use for catalogs
Public methodGetDefaultEmptyCatalog
Gets a default empty catalog, for meta-data stores which are populated through the designer, if the database of this driver supports no catalogs
Public methodGetDefaultEmptySchema
Gets a default empty schema, for meta-data stores which are populated through the designer, if the database of this driver supports no multiple schemas
Public methodGetDefaultSchemaName
Gets the default name to use for schemas.
Protected methodGetFixedLengthTypes
Gets the fixed length types (with multiple bytes, like char, binary), not b/clobs, for this driver. Used for optimizing the SortOrder per db type.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Protected methodGetSqlQuerySeparator
Gets the query separator string (including an empty line following it), to separate different queries in a batch. By default it returns: ";\r\n\r\n"
Public methodGetTargetDescription
Gets the target description of the target the driver is connected to, for display in a UI
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodGetVariableLengthTypes
Gets the variable length types (with multiple bytes, like varchar, varbinary), not b/clobs, for this driver. Used for optimizing the SortOrder per db type.
Protected methodHandleContainedListChangedTChangeType
Handles the contained list changed.
(Inherited from DBElementBase.)
Protected methodInitDataStructures
Inits the data structures of this driver. Call before anything starts.
Public methodInitializeForSpecificTargetFramework
Will perform specific initialization work for the driver instance, like mapping table updates, for the target framework specified. The default implementation is empty.
Public methodLogError
Logs an error in the ErrorLog structure of this object.
(Inherited from DBElementBase.)
Public methodLogWarning
Logs the description as a warning.
(Inherited from DBElementBase.)
Protected methodMarkElementAsChangedTChangeType
Marks the element as changed.
(Inherited from DBElementBase.)
Public methodMarkElementAsRemoved
Marks the element as removed, which raises the ElementRemoved event.
(Inherited from DBElementBase.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodObtainDbProviderFactoryInstance
Retrieves the DbProviderFactory instance to use. By default it uses the DbProviderFactories.GetFactory() method using the names provided by the method GetDbProviderFactoryInvariantNames
Protected methodOnContainedElementAdded
Called when this object received an event of type ContainedElementAdded
(Inherited from DBElementBase.)
Protected methodOnContainedElementChanged
Called when this object received an event of type ContainedElementChanged
(Inherited from DBElementBase.)
Protected methodOnContainedElementRemoved
Called when this object received an event of type ContainedElementRemoved
(Inherited from DBElementBase.)
Protected methodOnPopulatingCatalog
Called when the catalog with the name specified is about to be populated by this driver.
Protected methodOnPropertyChanged
Raises the PropertyChanged event.
(Inherited from DBElementBase.)
Protected methodPerformAdditionalContainedElementChangedWork
Performs the additional contained element changed work. Override if additional work has to be done after the OnContainedElementChanged method has run.
(Inherited from DBElementBase.)
Protected methodPerformPostSetConnectionElementsWork
Performs the post set connection elements work. By default that's nothing. Use this method to process settings set in the connection dialog.
Public methodPopulateCatalogs
Populates the catalog(s) with the elements specified in the selectedElements datastructure. This routine uses the callbacks specified in callbacks to visualize the progress.
Public methodPreProcessCustomPropertyValue
Pre-processes the passed in string to make it a valid custom property value. By default, strings are capped on 256 characters and CRLF's are removed.
Protected methodProduceFullNameForCommandExecution
Produces the full name for command execution. The name returned is immediately usable as a name to target the element, e.g. a stored procedure.
Protected methodProduceMajorAndMinorServerVersionNumber
Produces the major and minor server version number from the ServerVersion string
Public methodReset
Resets this instance.
Public methodResetErrorLog
Resets the Error Log for this object to an empty list.
(Inherited from DBElementBase.)
Protected methodSerializeAdditionalAttributes
Serializes the additional attributes.
(Inherited from DBElementBase.)
Protected methodSetCatalogNameAsDefault
Sets the catalog name passed in as the default catalog.
Public methodSetConnectionElements
Sets the connection elements to the contents of the passed in dictionary by copying them over into the ConnectionElements dictionary. The current values in ConnectionElements are removed first.
Protected methodSetTransientErrorRecoveryStrategy
Sets the transient error recovery strategy to the one specified.
Protected methodSplitSqlString
Splits the string specified on the default separator string for this database. Assumes the string has been stripped from comments.
Protected methodSplitSqlStringWithLineDelimiter
Splits the string specified based on lines with the delimiter string specified, e.g. 'go' on a separate line will split the string on that line, ignoring 'go'.
Protected methodSuffixSqlQueryForSingleCmdExecution
Suffixes the specified query with a string (usually ';') to make it usable in a single cmd execution. Some databases can't deal with a ';' at the end, so override this method in that case and suffx the fragment with another character or none at all.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateSortOrderPerDBType
Resets the SortOrderPerDBType data-structure and updates the order with the setting values specified.
Protected methodWrapIdentifier
Wraps the string specified as an identifier in the characters required for the database. E.g. in postgresql / oracle the identifier is wrapped in "", in SQL Server, it's in []. The default implementation wraps it in ""
Top
Events
  NameDescription
Public eventContainedElementAdded
Raised when an element was added to a collection (indirectly) contained in this element
(Inherited from DBElementBase.)
Public eventContainedElementChanged
Raised when an element contained in this element was changed.
(Inherited from DBElementBase.)
Public eventContainedElementRemoved
Raised when an element was removed from a collection (indirectly) contained in this element
(Inherited from DBElementBase.)
Public eventHasBeenChanged
Raised when the implementing element has been changed
(Inherited from DBElementBase.)
Public eventHasBeenRemoved
Raised when the implementing element has been removed from its container
(Inherited from DBElementBase.)
Public eventPropertyChanged
Occurs when a property value changes. (INotifyPropertyChanged)
(Inherited from DBElementBase.)
Top
Fields
  NameDescription
Public fieldStatic memberCommandTimeOut
The command timeout to use by the driver for activity with the db.
Top
See Also