C# Класс DataTableWriter.Drivers.PostgresDriver

Represents a mapping between Postgres-dialect SQL and the assorted actions the DbAdapter needs in order to accomplish its tasks.
Наследование: IDbDriver
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
postgresToSystemTypeMap string>.IReadOnlyDictionary
systemToPostgresTypeMap string>.IReadOnlyDictionary

Открытые методы

Метод Описание
BuildConnection ( IDbConnectionInfo connectionInfo ) : IDbConnection

Builds a Postgres connection object for the given remote Postgres server.

BuildQueryAddColumnToTable ( string tableName, DataColumn column ) : string

Builds a Postgres alter statement to add a column to a table.

BuildQueryClusterIndex ( string tableName, string indexName ) : string

Builds a query to Cluster an index.

BuildQueryColumnNamesAndTypes ( string tableName, bool excludeIdentityColumn = true ) : string

Builds a Postgres query to retrieve the names and types of all columns in a table.

BuildQueryCreateTable ( string tableName, ICollection columns ) : string

Builds a table creation statement in Postgres DDL.

BuildQueryDeleteRows ( string tableName, int interval ) : string

Builds a query to delete rows older than X amount of days.

BuildQueryDropIndex ( string indexName ) : string

Builds a query to drop an index.

BuildQueryGetIndexes ( string tableName ) : string

Builds a query to find all of the indexes on a given table.

BuildQueryIndex ( string tableName, string columnName, string indexName ) : string

Builds a query to create an index.

BuildQueryInsertRow ( string tableName, ICollection columnList, IDataParameterCollection parameterList ) : string

Builds a Postgres query to insert a row of data into a table.

BuildQuerySelectTable ( string tableName ) : string

Builds a Postgres table selection statement.

GetDefaultValueClause ( object defaultValue ) : string

Generates the Postgres dialect expression of a default value.

GetIdentityColumnSpecification ( ) : string

Generates the Postgres dialect expression of an identity column specification.

GetStandardColumnSpecification ( string columnName, string columnType ) : string

Generates the Postgres dialect expression of a standard column specification.

MapToDbType ( string systemType, bool allowDbNull ) : string

Maps the name of a C# System type to a Postgres type.

MapToSystemType ( string pgType ) : Type

Maps the name of a Postgres type to a C# System type.

Описание методов

BuildConnection() публичный Метод

Builds a Postgres connection object for the given remote Postgres server.
public BuildConnection ( IDbConnectionInfo connectionInfo ) : IDbConnection
connectionInfo IDbConnectionInfo The database connection information.
Результат IDbConnection

BuildQueryAddColumnToTable() публичный Метод

Builds a Postgres alter statement to add a column to a table.
public BuildQueryAddColumnToTable ( string tableName, DataColumn column ) : string
tableName string The name of the table to add the column to.
column System.Data.DataColumn The column to add.
Результат string

BuildQueryClusterIndex() публичный Метод

Builds a query to Cluster an index.
public BuildQueryClusterIndex ( string tableName, string indexName ) : string
tableName string The name of the table to alter.
indexName string The name of the index to cluster on.
Результат string

BuildQueryColumnNamesAndTypes() публичный Метод

Builds a Postgres query to retrieve the names and types of all columns in a table.
public BuildQueryColumnNamesAndTypes ( string tableName, bool excludeIdentityColumn = true ) : string
tableName string The name of the table to retrieve information about.
excludeIdentityColumn bool Flag indicating whether the statement should exclude the ID column.
Результат string

BuildQueryCreateTable() публичный Метод

Builds a table creation statement in Postgres DDL.
public BuildQueryCreateTable ( string tableName, ICollection columns ) : string
tableName string The name of the table to create.
columns ICollection The names of the columns to include in the table.
Результат string

BuildQueryDeleteRows() публичный Метод

Builds a query to delete rows older than X amount of days.
public BuildQueryDeleteRows ( string tableName, int interval ) : string
tableName string The name of the table to drop rows from.
interval int The interval for days to drop.
Результат string

BuildQueryDropIndex() публичный Метод

Builds a query to drop an index.
public BuildQueryDropIndex ( string indexName ) : string
indexName string The name of the index to drop.
Результат string

BuildQueryGetIndexes() публичный Метод

Builds a query to find all of the indexes on a given table.
public BuildQueryGetIndexes ( string tableName ) : string
tableName string
Результат string

BuildQueryIndex() публичный Метод

Builds a query to create an index.
public BuildQueryIndex ( string tableName, string columnName, string indexName ) : string
tableName string The name of the table to create the index on.
columnName string The name of the column that will be indexed.
indexName string
Результат string

BuildQueryInsertRow() публичный Метод

Builds a Postgres query to insert a row of data into a table.
public BuildQueryInsertRow ( string tableName, ICollection columnList, IDataParameterCollection parameterList ) : string
tableName string The name of the table to insert data into.
columnList ICollection The list of columns that make up the row.
parameterList IDataParameterCollection A collection of parameters to insert.
Результат string

BuildQuerySelectTable() публичный Метод

Builds a Postgres table selection statement.
public BuildQuerySelectTable ( string tableName ) : string
tableName string The name of the table to select.
Результат string

GetDefaultValueClause() публичный Метод

Generates the Postgres dialect expression of a default value.
public GetDefaultValueClause ( object defaultValue ) : string
defaultValue object The default value to assign.
Результат string

GetIdentityColumnSpecification() публичный Метод

Generates the Postgres dialect expression of an identity column specification.
public GetIdentityColumnSpecification ( ) : string
Результат string

GetStandardColumnSpecification() публичный Метод

Generates the Postgres dialect expression of a standard column specification.
public GetStandardColumnSpecification ( string columnName, string columnType ) : string
columnName string The name of the column.
columnType string The data type of the column.
Результат string

MapToDbType() публичный Метод

Maps the name of a C# System type to a Postgres type.
public MapToDbType ( string systemType, bool allowDbNull ) : string
systemType string The name of the System type.
allowDbNull bool Flag indicating whether the input type is nullable.
Результат string

MapToSystemType() публичный Метод

Maps the name of a Postgres type to a C# System type.
public MapToSystemType ( string pgType ) : Type
pgType string The name of the Postgres type.
Результат Type

Описание свойств

postgresToSystemTypeMap защищенное свойство

protected IReadOnlyDictionary postgresToSystemTypeMap
Результат string>.IReadOnlyDictionary

systemToPostgresTypeMap защищенное свойство

protected IReadOnlyDictionary systemToPostgresTypeMap
Результат string>.IReadOnlyDictionary