Class SQLiteSchemaProvider

Namespace
DbExport.Providers.SQLite
Assembly
DbExport.Api.dll

Provides schema information for SQLite databases. This class implements the ISchemaProvider interface, enabling retrieval of database schema metadata such as table names, column names, foreign key names, and associated metadata.

public class SQLiteSchemaProvider : ISchemaProvider
Inheritance
SQLiteSchemaProvider
Implements
Inherited Members

Constructors

SQLiteSchemaProvider(string)

Initializes a new instance of the SQLiteSchemaProvider class.

public SQLiteSchemaProvider(string connectionString)

Parameters

connectionString string

The connection string used to connect to the SQLite database.

Properties

ConnectionString

Gets the connection string used to connect to the database.

public string ConnectionString { get; }

Property Value

string

DatabaseName

Gets the name of the database for which the schema information is being retrieved.

public string DatabaseName { get; }

Property Value

string

ProviderName

Gets the name of the database provider.

public string ProviderName { get; }

Property Value

string

Methods

GetColumnMeta(string, string, string)

Extracts the metadata for a specified column within a table and its owner, including information such as data type, nullability, default values, and other relevant schema details specific to the column.

public MetaData GetColumnMeta(string tableName, string tableOwner, string columnName)

Parameters

tableName string

The name of the table containing the column for which to retrieve metadata.

tableOwner string

The owner of the table containing the column for which to retrieve metadata.

columnName string

The name of the column for which to retrieve metadata.

Returns

MetaData

A MetaData object containing the metadata for the specified column, table, and owner.

GetColumnNames(string, string)

Extracts the names of all columns for a specified table and its owner.

public string[] GetColumnNames(string tableName, string tableOwner)

Parameters

tableName string

The name of the table for which to retrieve column names.

tableOwner string

The owner of the table for which to retrieve column names.

Returns

string[]

An array of column names for the specified table and owner.

GetForeignKeyMeta(string, string, string)

Extracts the metadata for a specified foreign key within a table and its owner, including information such as referenced table and columns, foreign key constraints, and other relevant schema details specific to the foreign key relationship.

public MetaData GetForeignKeyMeta(string tableName, string tableOwner, string fkName)

Parameters

tableName string

The name of the table containing the foreign key for which to retrieve metadata.

tableOwner string

The owner of the table containing the foreign key for which to retrieve metadata.

fkName string

The name of the foreign key for which to retrieve metadata.

Returns

MetaData

A MetaData object containing the metadata for the specified foreign key, table, and owner.

GetForeignKeyNames(string, string)

Extracts the names of all foreign keys for a specified table and its owner.

public string[] GetForeignKeyNames(string tableName, string tableOwner)

Parameters

tableName string

That name of the table for which to retrieve foreign key names.

tableOwner string

The owner of the table for which to retrieve foreign key names.

Returns

string[]

An array of foreign key names for the specified table and owner.

GetIndexMeta(string, string, string)

Extracts the metadata for a specified index within a table and its owner, including information such as index type, indexed columns, uniqueness, and other relevant schema details specific to the index.

public MetaData GetIndexMeta(string tableName, string tableOwner, string indexName)

Parameters

tableName string

The name of the table containing the index for which to retrieve metadata.

tableOwner string

The owner of the table containing the index for which to retrieve metadata.

indexName string

The name of the index for which to retrieve metadata.

Returns

MetaData

A MetaData object containing the metadata for the specified index, table, and owner.

GetIndexNames(string, string)

Extracts the names of all indexes for a specified table and its owner.

public string[] GetIndexNames(string tableName, string tableOwner)

Parameters

tableName string

The name of the table for which to retrieve index names.

tableOwner string

The owner of the table for which to retrieve index names.

Returns

string[]

An array of index names for the specified table and owner.

GetTableMeta(string, string)

Extracts the metadata for a specified table and its owner, including information such as column data types, index definitions, foreign key relationships, and other relevant schema details.

public MetaData GetTableMeta(string tableName, string tableOwner)

Parameters

tableName string

The name of the table for which to retrieve metadata.

tableOwner string

The owner of the table for which to retrieve metadata.

Returns

MetaData

A MetaData object containing the metadata for the specified table and owner.

GetTableNames()

Extracts the names of all tables in the database, along with their respective owners.

public NameOwnerPair[] GetTableNames()

Returns

NameOwnerPair[]

An array of NameOwnerPair objects, each containing the name and owner of a table.