Interface IAdbDataSourceInformationService
Provides information about a data source behind a connection, such as what character to use for quoting, how to specify parameter markers etc. The information is mainly taken from the "DataSourceInformation" schema collection, and is used to write provider-independent database code.
Implementations of this interface must be immutable. This avoids threading issues, since an instance is often accessed by multiple threads. Any user custom provider services should also be immutable for the same reason.
Namespace: actionETL.Adb
Assembly: actionETL.dll
Syntax
public interface IAdbDataSourceInformationService
Properties
CompositeIdentifierSeparator
Gets the composite identifier separator, that separates the table name from the schema name etc.
Note that some providers use a different character when including e.g. the database name. Therefore always use the methods in AdbTableInformation to manipulate table identifiers, such as ComposeTableIdentifierParts(String, String, String) and CreateTableIdentifier(String).
Declaration
string CompositeIdentifierSeparator { get; }
Property Value
| Type | Description |
|---|---|
| String |
CompositeIdentifierSeparatorPattern
Gets the composite identifier separator regular expression pattern.
Declaration
string CompositeIdentifierSeparatorPattern { get; }
Property Value
| Type | Description |
|---|---|
| String |
Connection
Gets the Adb database connection.
Declaration
IAdbConnection Connection { get; }
Property Value
| Type | Description |
|---|---|
| IAdbConnection |
DataSourceProductName
Gets the name of the data source product.
Declaration
string DataSourceProductName { get; }
Property Value
| Type | Description |
|---|---|
| String |
DataSourceProductVersion
Gets the data source product version.
Declaration
string DataSourceProductVersion { get; }
Property Value
| Type | Description |
|---|---|
| String |
DataSourceProductVersionNormalized
Gets the normalized data source product version, which is easier
(vs. DataSourceProductVersion) to compare to find out which version is greater.
Declaration
string DataSourceProductVersionNormalized { get; }
Property Value
| Type | Description |
|---|---|
| String |
GroupByBehavior
Gets the relationship between the columns in a GROUP BY clause and the non-aggregated columns in the select-list of a SELECT statement.
Declaration
GroupByBehavior GroupByBehavior { get; }
Property Value
| Type | Description |
|---|---|
| GroupByBehavior |
IdentifierCase
Gets how identifiers are treated by the data source when searching the system catalog.
Declaration
IdentifierCase IdentifierCase { get; }
Property Value
| Type | Description |
|---|---|
| IdentifierCase |
IdentifierPattern
Gets the regular expression pattern that matches an unquoted (non-composite) identifier and has a match value of the identifier, or the empty string if not available.
Declaration
string IdentifierPattern { get; }
Property Value
| Type | Description |
|---|---|
| String | For example |
IdentifierQuotePrefix
Gets the identifier quote prefix, i.e. the quote string used on the left side of an identifier part.
Declaration
string IdentifierQuotePrefix { get; }
Property Value
| Type | Description |
|---|---|
| String |
IdentifierQuotePrefixes
Gets the identifier quote prefixes, i.e. all possible quote characters used on the left side of an identifier part.
Declaration
string IdentifierQuotePrefixes { get; }
Property Value
| Type | Description |
|---|---|
| String |
IdentifierQuoteSuffix
Gets the identifier quote suffix, i.e. the quote string used on the right side of an identifier part.
Declaration
string IdentifierQuoteSuffix { get; }
Property Value
| Type | Description |
|---|---|
| String |
IdentifierQuoteSuffixes
Gets the identifier quote suffixes, i.e. all possible quote characters used on the right side of an identifier part.
Declaration
string IdentifierQuoteSuffixes { get; }
Property Value
| Type | Description |
|---|---|
| String |
OrderByColumnsInSelect
Gets whether columns in an ORDER BY clause must be in the select list.
Declaration
bool OrderByColumnsInSelect { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
ParameterMarkerFormat
Gets a format string that can be used to format a parameter.
If named parameters are not supported, and the provider expects the use of the ?
character, the format string should be ?, which would ignore the parameter name.
Declaration
string ParameterMarkerFormat { get; }
Property Value
| Type | Description |
|---|---|
| String | For example |
ParameterMarkerPattern
Gets a regular expression pattern that matches a parameter marker, and with a match value of the parameter name, if any.
Declaration
string ParameterMarkerPattern { get; }
Property Value
| Type | Description |
|---|---|
| String | The regular expression parameter marker pattern.
For example, if named parameters are supported with an
If named parameters instead are supported with a ?.
|
ParameterNameMaxLength
Gets the maximum length in characters of the parameter name, or 0 if parameter
names are not supported.
Declaration
int ParameterNameMaxLength { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
ParameterNamePattern
Gets the regular expression pattern that matches valid parameter names.
Declaration
string ParameterNamePattern { get; }
Property Value
| Type | Description |
|---|---|
| String |
QuotedIdentifierCase
Gets whether quoted identifiers are treated as case sensitive or not.
Declaration
IdentifierCase QuotedIdentifierCase { get; }
Property Value
| Type | Description |
|---|---|
| IdentifierCase |
QuotedIdentifierPattern
Gets a regular expression that matches a quoted (non-composite) identifier and has a match value of the identifier itself without the quotes.
Declaration
string QuotedIdentifierPattern { get; }
Property Value
| Type | Description |
|---|---|
| String | The quoted identifier regular expression pattern.
For example, if the data source uses double-quotes to identify quoted identifiers,
this would be: |
StatementSeparatorPattern
Gets a regular expression pattern that matches the statement separator.
Declaration
string StatementSeparatorPattern { get; }
Property Value
| Type | Description |
|---|---|
| String |
StringLiteralPattern
Gets a regular expression pattern that matches a string literal, and has a match value of the literal itself.
Declaration
string StringLiteralPattern { get; }
Property Value
| Type | Description |
|---|---|
| String | For example, if the data source uses single-quotes to identify strings, this
would be: |
SupportedJoinOperators
Gets the supported join operators.
Declaration
SupportedJoinOperators SupportedJoinOperators { get; }
Property Value
| Type | Description |
|---|---|
| SupportedJoinOperators |
UsesPositionalParameters
Returns true if the provider uses positional parameters;
returns false if the provider uses named parameters.
Also see GetPlaceholder(String).
Declaration
bool UsesPositionalParameters { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Methods
GetPlaceholder(String)
Returns the parameter placeholder string, for creating SQL queries.
Declaration
string GetPlaceholder(string parameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | parameterName | The parameter name, with or without a parameter marker. |
Returns
| Type | Description |
|---|---|
| String | The parameter placeholder, e.g. |
QuoteIdentifierPart(String)
Quotes the table or column identifier part, i.e. column name, table name, schema/owner name, or database/catalog name. Does not quote it if it's already quoted with IdentifierQuotePrefix and IdentifierQuoteSuffix.
Declaration
string QuoteIdentifierPart(string unquotedIdentifierPart)
Parameters
| Type | Name | Description |
|---|---|---|
| String | unquotedIdentifierPart | The potentially unquoted identifier part. |
Returns
| Type | Description |
|---|---|
| String | The quoted identifier part. |
StripParameterMarker(String)
Returns the specified parameter name with a parameter marker removed (if present), if the provider uses named parameters. Otherwise the parameter name is returned unchanged.
Declaration
string StripParameterMarker(string parameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | parameterName | The parameter name, with or without a parameter marker. |
Returns
| Type | Description |
|---|---|
| String | The parameter name, with any parameter marker removed. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | parameterName |