Search Results for

    Show / Hide Table of Contents

    Namespace actionETL.Adb.MySqlConnectorExternal

    Contains the MySqlConnector Adb database provider and supporting services for MySQL™ and MariaDB™. Also see Adb MySqlConnector Provider.

    Classes

    AdbMySqlConnectorBulkInsertTarget<TInput>

    A dataflow worker that inserts all incoming records into a MySQL™ (or compatible) table or view using MySqlConnector.MySqlBulkCopy, which achieves high performance by loading records in bulk.

    Note that this worker requires an AdbMySqlConnectorProvider connection, see SQL Database Access for details.

    Also note that your connection string must include AllowLoadLocalInfile=true, see Using Load Data Local Infile for details.

    Implicit batches are formed every 16MiB since that's the maximum size of a single MySQL network packet.

    Note: This worker does participate in any transaction currently active on the connection.

    Note: Use the factory methods in AdbMySqlConnectorBulkInsertTargetFactory to create instances of this class.

    AdbMySqlConnectorBulkInsertTargetFactory

    Factory methods that create an AdbMySqlConnectorBulkInsertTarget<TInput>(in DownstreamFactory<TInput>, String, Action<IColumnMapperCommand>, IAdbConnectionBuilder, String) dataflow worker, which inserts all incoming records into a MySQL™ (or compatible) table or view using MySqlConnector.MySqlBulkCopy, which achieves high performance by loading records in bulk.

    Note that this worker requires an AdbMySqlConnectorProvider connection, see SQL Database Access for details.

    Also note that your connection string must include AllowLoadLocalInfile=true, see Using Load Data Local Infile for details.

    Implicit batches are formed every 16MiB since that's the maximum size of a single MySQL network packet.

    Note: This worker does participate in any transaction currently active on the connection.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Get the factory from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>).

    AdbMySqlConnectorDataSourceInformationService

    A service that uses the MySqlConnector 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 MySqlConnector provider, see AdbMySqlConnectorProvider 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.

    AdbMySqlConnectorProvider

    A static class where the Get() overloads return AdbProvider immutable instances that wrap the MySqlConnector ADO.NET database provider for accessing MySQL™ and MariaDB™ databases, which assists with writing provider-independent code, mapping between .NET CLR types and database types, etc.

    Use the retrieved AdbProvider instance to create AdbConnectionString, AdbConnectionBuilder, AdbKeepOpenConnectionBuilder and AdbCommandBuilder instances, or pass the provider instance to other methods for them to use it.

    Note that it is best practice to select which provider to use in only one place in the application, to make it easy to switch to a different provider instance, especially since settings such as how to quote identifiers is specified by creating the appropriate provider instance.

    Each AdbProvider instance contains a set of services that implements the provider functionality. You can create a new modified provider instance from an existing one by using its With*() methods to replace one of its services. Custom services can be derived from existing ones, or created from scratch. Alternatively, create a custom provider by using the AdbProvider constructor, specifying all the services.

    This provider uses the following service classes:

    • AdbMySqlConnectorTypeService
    • AdbMySqlConnectorTypeMapper
    • AdbMySqlConnectorTableCommandService
    • AdbMySqlConnectorDataSourceInformationService
    • AdbSql92InsertStatementService

    AdbMySqlConnectorTableCommandService

    An optional service that uses the MySqlConnector ADO.NET provider to execute predefined table commands (truncate, drop, delete all rows). This class is normally not used directly by the user, but instead via TableCommand. You can however derive from this class (or from a base or descendant class) to customize the information for either the same .NET provider, or for a different but similar .NET provider.

    Also see HasTableCommandService, AdbMySqlConnectorTableInformationService, AdbMySqlConnectorDataSourceInformationService, AdbConnection and AdbProvider.

    AdbMySqlConnectorTableInformationService

    An optional service that uses the MySqlConnector ADO.NET provider that manipulates table identifiers and provides information about table-like objects, such as which ones exists and what their type is (table, view, etc), and which columns are present. This assists with writing provider-independent database code, and is available as TableInformation. Also see HasTableInformationService, AdbMySqlConnectorTableCommandService, AdbMySqlConnectorDataSourceInformationService, AdbConnection and AdbProvider.

    Derive from this class (or from a base or descendant class) to customize the information for either the same .NET provider, or for a different but similar .NET provider.

    AdbMySqlConnectorTypeMapper

    Stores mappings between .NET types and database types for the MySqlConnector MySQL™ or MariaDB™ provider, and allows setting the database type of database parameters from these mappings.

    See the Data Type Mappings, as well as AdbTypeMapper and predefined type mappings for further details.

    This class can be derived from to create a customized provider that revises and adds mappings.

    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.

    AdbMySqlConnectorTypeService

    Gets and sets types and values on database parameters for a MySqlConnector MySQL™ or MariaDB™ provider.

    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.

    In This Article
    Back to top Copyright © 2023 Envobi Ltd