Search Results for

    Show / Hide Table of Contents

    Namespace actionETL.Adb.SQLiteExternal

    Contains the Adb database provider and supporting services for SQLite and its System.Data.SQLite .NET database provider.

    Classes

    AdbSQLiteDataSourceInformationService

    Provides information about a SQLite 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 SQLite provider. See AdbProvider and Information.

    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.

    AdbSQLiteProvider

    A static class where the Get() overloads return AdbProvider immutable instances that wrap the System.Data.SQLite ADO.NET provider for SQLite databases, which assists with writing provider-independent code, mapping between .NET CLR types and database types, etc. Also see the SQLite database documentation.

    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:

    • AdbSQLiteTypeService
    • AdbSQLiteTypeMapper
    • AdbSQLiteTableCommandService
    • AdbSQLiteDataSourceInformationService
    • AdbSql92InsertStatementService

    AdbSQLiteTableCommandService

    For a SQLite data source, implements an optional service that executes 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, AdbSQLiteTableInformationService, AdbSQLiteDataSourceInformationService, AdbConnection and AdbProvider.

    AdbSQLiteTableInformationService

    An optional service for a SQLite data source 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, AdbSQLiteDataSourceInformationService, 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.

    AdbSQLiteTypeMapper

    Stores mappings between .NET types and database types, and allows setting the database type of database parameters from these mappings.

    This class adds mappings for SQLite database types. 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.

    AdbSQLiteTypeService

    Gets and sets types and values on database parameters for a System.Data.SQLite provider, such as AdbSQLiteProvider.

    Note that SQLite has no provider-specific types, so this class will use SQLiteParameter.DbType and SQLiteParameter.Value.

    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