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
파일 보기 프로젝트 열기: tableau/TabMon

보호된 프로퍼티들

프로퍼티 타입 설명
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