C# 클래스 NSoft.NFramework.Data.PostgreSql.EnterpriseLibrary.NpgsqlDatabase

상속: Microsoft.Practices.EnterpriseLibrary.Data.Database
파일 보기 프로젝트 열기: debop/NFramework 1 사용 예제들

공개 메소드들

메소드 설명
AddInParameter ( DbCommand command, string name, NpgsqlDbType dbType ) : void

Adds a new In DbParameter object to the given command.

This version of the method is used when you can have the same parameter object multiple times with different values.

AddInParameter ( DbCommand command, string name, NpgsqlDbType dbType, object value ) : void

Adds a new In DbParameter object to the given command.

AddInParameter ( DbCommand command, string name, NpgsqlDbType dbType, string sourceColumn, DataRowVersion sourceVersion ) : void

Adds a new In DbParameter object to the given command.

AddOutParameter ( DbCommand command, string name, NpgsqlDbType dbType, int size ) : void

Adds a new Out DbParameter object to the given command.

AddParameter ( DbCommand command, string name, NpgsqlDbType dbType, ParameterDirection direction, string sourceColumn, DataRowVersion sourceVersion, object value ) : void

Adds a new instance of a DbParameter object to the command.

AddParameter ( DbCommand command, string name, NpgsqlDbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : void

Adds a new instance of a DbParameter object to the command.

BuildParameterName ( string name ) : string

Builds a value parameter name for the current database.

CheckIfNpgsqlCommand ( DbCommand command ) : NpgsqlCommand

Checks if a database command is a Npgsql command and converts.

ExecuteDataSet ( DbTransaction transaction, string storedProcedureName ) : DataSet

Executes the storedProcedureName with parameterValues as part of the transaction and returns the results in a new T:System.Data.DataSet within a transaction.

ExecuteDataSet ( string storedProcedureName ) : DataSet

Executes the storedProcedureName with parameterValues and returns the results in a new T:System.Data.DataSet.

ExecuteNonQuery ( DbTransaction transaction, string storedProcedureName ) : int

Executes the storedProcedureName using the given parameterValues within a transaction and returns the number of rows affected.

ExecuteNonQuery ( string storedProcedureName ) : int

Executes the storedProcedureName using the given parameterValues and returns the number of rows affected.

ExecuteReader ( DbTransaction transaction, string storedProcedureName ) : IDataReader

Executes the storedProcedureName with the given parameterValues within the given transaction and returns an through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

ExecuteReader ( string storedProcedureName ) : IDataReader

Executes the storedProcedureName with the given parameterValues and returns an through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

ExecuteScalar ( DbTransaction transaction, string storedProcedureName ) : object

Executes the storedProcedureName with the given parameterValues within a transaction and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

ExecuteScalar ( string storedProcedureName ) : object

Executes the storedProcedureName with the given parameterValues and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

NpgsqlDatabase ( string connectionString ) : System

생성자

보호된 메소드들

메소드 설명
ConfigureParameter ( DbParameter param, string name, DbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : void

Configures a given DbParameter.

CreateParameter ( string name, NpgsqlDbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : DbParameter

Adds a new instance of a DbParameter object.

SameNumberOfParametersAndValues ( DbCommand command, object values ) : bool

Determines if the number of parameters in the command matches the array of parameter values.

UserParametersStartIndex ( ) : int

Returns the starting index for parameters in a command.

비공개 메소드들

메소드 설명
ConfigureParameter ( Npgsql.NpgsqlParameter parameter, string name, NpgsqlDbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : void
DeriveParameters ( DbCommand discoveryCommand ) : void
OnNpgsqlRowUpdated ( object sender, Npgsql.NpgsqlRowUpdatedEventArgs rowThatCouldNotBeWritten ) : void

Called when [NPGSQL row updated].

SetUpRowUpdatedEvent ( DbDataAdapter adapter ) : void

메소드 상세

AddInParameter() 공개 메소드

Adds a new In DbParameter object to the given command.
This version of the method is used when you can have the same parameter object multiple times with different values.
public AddInParameter ( DbCommand command, string name, NpgsqlDbType dbType ) : void
command System.Data.Common.DbCommand The command to add the in parameter.
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
리턴 void

AddInParameter() 공개 메소드

Adds a new In DbParameter object to the given command.
public AddInParameter ( DbCommand command, string name, NpgsqlDbType dbType, object value ) : void
command System.Data.Common.DbCommand The commmand to add the parameter.
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
value object The value of the parameter.
리턴 void

AddInParameter() 공개 메소드

Adds a new In DbParameter object to the given command.
public AddInParameter ( DbCommand command, string name, NpgsqlDbType dbType, string sourceColumn, DataRowVersion sourceVersion ) : void
command System.Data.Common.DbCommand The command to add the parameter.
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
sourceColumn string The name of the source column mapped to the DataSet and used for loading or returning the value.
sourceVersion DataRowVersion One of the values.
리턴 void

AddOutParameter() 공개 메소드

Adds a new Out DbParameter object to the given command.
public AddOutParameter ( DbCommand command, string name, NpgsqlDbType dbType, int size ) : void
command System.Data.Common.DbCommand The command to add the out parameter.
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
size int The maximum size of the data within the column.
리턴 void

AddParameter() 공개 메소드

Adds a new instance of a DbParameter object to the command.
public AddParameter ( DbCommand command, string name, NpgsqlDbType dbType, ParameterDirection direction, string sourceColumn, DataRowVersion sourceVersion, object value ) : void
command System.Data.Common.DbCommand The command to add the parameter.
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
direction ParameterDirection One of the values.
sourceColumn string The name of the source column mapped to the DataSet and used for loading or returning the .
sourceVersion DataRowVersion One of the values.
value object The value of the parameter.
리턴 void

AddParameter() 공개 메소드

Adds a new instance of a DbParameter object to the command.
public AddParameter ( DbCommand command, string name, NpgsqlDbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : void
command System.Data.Common.DbCommand The command to add the parameter.
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
size int The maximum size of the data within the column.
direction ParameterDirection One of the values.
nullable bool A value indicating whether the parameter accepts (Nothing in Visual Basic) values.
precision byte The maximum number of digits used to represent the .
scale byte The number of decimal places to which is resolved.
sourceColumn string The name of the source column mapped to the DataSet and used for loading or returning the .
sourceVersion DataRowVersion One of the values.
value object The value of the parameter.
리턴 void

BuildParameterName() 공개 메소드

Builds a value parameter name for the current database.
public BuildParameterName ( string name ) : string
name string The name of the parameter.
리턴 string

CheckIfNpgsqlCommand() 공개 정적인 메소드

Checks if a database command is a Npgsql command and converts.
public static CheckIfNpgsqlCommand ( DbCommand command ) : NpgsqlCommand
command System.Data.Common.DbCommand The command.
리턴 Npgsql.NpgsqlCommand

ConfigureParameter() 보호된 메소드

Configures a given DbParameter.
protected ConfigureParameter ( DbParameter param, string name, DbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : void
param System.Data.Common.DbParameter The to configure.
name string The name of the parameter.
dbType DbType One of the values.
size int The maximum size of the data within the column.
direction ParameterDirection One of the values.
nullable bool A value indicating whether the parameter accepts (Nothing in Visual Basic) values.
precision byte The maximum number of digits used to represent the .
scale byte The number of decimal places to which is resolved.
sourceColumn string The name of the source column mapped to the DataSet and used for loading or returning the .
sourceVersion DataRowVersion One of the values.
value object The value of the parameter.
리턴 void

CreateParameter() 보호된 메소드

Adds a new instance of a DbParameter object.
protected CreateParameter ( string name, NpgsqlDbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value ) : DbParameter
name string The name of the parameter.
dbType NpgsqlDbType One of the values.
size int The maximum size of the data within the column.
direction ParameterDirection One of the values.
nullable bool A value indicating whether the parameter accepts (Nothing in Visual Basic) values.
precision byte The maximum number of digits used to represent the .
scale byte The number of decimal places to which is resolved.
sourceColumn string The name of the source column mapped to the DataSet and used for loading or returning the .
sourceVersion DataRowVersion One of the values.
value object The value of the parameter.
리턴 System.Data.Common.DbParameter

ExecuteDataSet() 공개 메소드

Executes the storedProcedureName with parameterValues as part of the transaction and returns the results in a new T:System.Data.DataSet within a transaction.
public ExecuteDataSet ( DbTransaction transaction, string storedProcedureName ) : DataSet
transaction System.Data.Common.DbTransaction The to execute the command within.
storedProcedureName string The stored procedure to execute.
리턴 System.Data.DataSet

ExecuteDataSet() 공개 메소드

Executes the storedProcedureName with parameterValues and returns the results in a new T:System.Data.DataSet.
public ExecuteDataSet ( string storedProcedureName ) : DataSet
storedProcedureName string The stored procedure to execute.
리턴 System.Data.DataSet

ExecuteNonQuery() 공개 메소드

Executes the storedProcedureName using the given parameterValues within a transaction and returns the number of rows affected.
public ExecuteNonQuery ( DbTransaction transaction, string storedProcedureName ) : int
transaction System.Data.Common.DbTransaction The to execute the command within.
storedProcedureName string The name of the stored procedure to execute.
리턴 int

ExecuteNonQuery() 공개 메소드

Executes the storedProcedureName using the given parameterValues and returns the number of rows affected.
public ExecuteNonQuery ( string storedProcedureName ) : int
storedProcedureName string The name of the stored procedure to execute.
리턴 int

ExecuteReader() 공개 메소드

Executes the storedProcedureName with the given parameterValues within the given transaction and returns an through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.
public ExecuteReader ( DbTransaction transaction, string storedProcedureName ) : IDataReader
transaction System.Data.Common.DbTransaction The to execute the command within.
storedProcedureName string The command that contains the query to execute.
리턴 IDataReader

ExecuteReader() 공개 메소드

Executes the storedProcedureName with the given parameterValues and returns an through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.
public ExecuteReader ( string storedProcedureName ) : IDataReader
storedProcedureName string The command that contains the query to execute.
리턴 IDataReader

ExecuteScalar() 공개 메소드

Executes the storedProcedureName with the given parameterValues within a transaction and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
public ExecuteScalar ( DbTransaction transaction, string storedProcedureName ) : object
transaction System.Data.Common.DbTransaction The to execute the command within.
storedProcedureName string The stored procedure to execute.
리턴 object

ExecuteScalar() 공개 메소드

Executes the storedProcedureName with the given parameterValues and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
public ExecuteScalar ( string storedProcedureName ) : object
storedProcedureName string The stored procedure to execute.
리턴 object

NpgsqlDatabase() 공개 메소드

생성자
public NpgsqlDatabase ( string connectionString ) : System
connectionString string
리턴 System

SameNumberOfParametersAndValues() 보호된 메소드

Determines if the number of parameters in the command matches the array of parameter values.
protected SameNumberOfParametersAndValues ( DbCommand command, object values ) : bool
command System.Data.Common.DbCommand The containing the parameters.
values object The array of parameter values.
리턴 bool

UserParametersStartIndex() 보호된 메소드

Returns the starting index for parameters in a command.
protected UserParametersStartIndex ( ) : int
리턴 int