Class AdbMySqlClientDataSourceInformationService
A service that uses the MySql.Data.MySqlClient ADO.NET provider to supply information about a MySQL™ or MariaDB™ 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.
This class is used when creating AdbProvider instances, use one of the Get() overloads to retrieve the required delegate.
This class can be inherited to overwrite some values, and used to create a custom
MySql.Data.MySqlClient
provider, see AdbMySqlClientProvider and
Information for more details.
This class is 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.
Inheritance
Implements
Inherited Members
Namespace: actionETL.Adb.MySqlClientExternal
Assembly: actionETL.dll
Syntax
public class AdbMySqlClientDataSourceInformationService : AdbGenericDataSourceInformationService, IAdbDataSourceInformationService
Constructors
AdbMySqlClientDataSourceInformationService(IAdbConnection, Boolean)
Initializes a new instance of the AdbMySqlClientDataSourceInformationService class, which provides information about a MySQL™ or MariaDB™ data source behind a connection, such as what character to use for quoting, how to specify parameter markers etc.
Declaration
protected AdbMySqlClientDataSourceInformationService(IAdbConnection adbConnection, bool ansiQuotes)
Parameters
Type | Name | Description |
---|---|---|
IAdbConnection | adbConnection | An Adb database connection. |
Boolean | ansiQuotes | Set to
Set to Also see Schema Object Names. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | Cannot open a connection without specifying a data source or server. |
Methods
Get()
Gets a function that returns a new instance of AdbMySqlClientDataSourceInformationService (with default settings) on each invocation, which is used when instantiating a new AdbProvider for accessing a MySQL™ or MariaDB™ data source.
The instance uses the default backtick to quote and parse identifiers,
i.e. with IdentifierQuotePrefix and
IdentifierQuoteSuffix set to `
.
Also see Get(Boolean) and
Schema Object Names.
Declaration
public static Func<IAdbConnection, IAdbDataSourceInformationService> Get()
Returns
Type | Description |
---|---|
Func<IAdbConnection, IAdbDataSourceInformationService> |
Get(Boolean)
Gets a function that returns a new instance of AdbMySqlClientDataSourceInformationService on each invocation, which is used when instantiating a new AdbProvider for accessing a MySQL™ or MariaDB™ data source.
Declaration
public static Func<IAdbConnection, IAdbDataSourceInformationService> Get(bool ansiQuotes)
Parameters
Type | Name | Description |
---|---|---|
Boolean | ansiQuotes | Set to
Set to Also see Get() and Schema Object Names. |
Returns
Type | Description |
---|---|
Func<IAdbConnection, IAdbDataSourceInformationService> |