C# Class System.Data.Common.DbCommandBuilder

Inheritance: System.ComponentModel.Component
显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
BuildCache void
BuildDeleteCommand DbCommand
BuildInformation void
BuildInsertCommand DbCommand
BuildUpdateCommand DbCommand
BuildWhereClause int
CreateParameterForNullTest string
CreateParameterForValue string
GetBaseParameterName string
GetColumnValue object
GetColumnValue object
GetConnection DbConnection
GetDataColumn DataColumn
GetDeleteCommand DbCommand
GetInsertCommand DbCommand
GetNextParameter DbParameter
GetNullParameterName string
GetOriginalParameterName string
GetSelectCommand DbCommand
GetTableMapping DataTableMapping
GetUpdateCommand DbCommand
IncludeInInsertValues bool
IncludeInUpdateSet bool
IncludeInWhereClause bool
IncrementWhereCount bool
ParseProcedureName string[]
QuotedColumn string
RemoveExtraParameters void
RowUpdatingHandlerBuilder void

Public Methods

Method Description
GetDeleteCommand ( ) : DbCommand
GetDeleteCommand ( bool useColumnsForParameterNames ) : DbCommand
GetInsertCommand ( ) : DbCommand
GetInsertCommand ( bool useColumnsForParameterNames ) : DbCommand
GetUpdateCommand ( ) : DbCommand
GetUpdateCommand ( bool useColumnsForParameterNames ) : DbCommand
QuoteIdentifier ( string unquotedIdentifier ) : string
RefreshSchema ( ) : void
UnquoteIdentifier ( string quotedIdentifier ) : string

Protected Methods

Method Description
ApplyParameterInfo ( DbParameter parameter, DataRow row, StatementType statementType, bool whereClause ) : void
DbCommandBuilder ( ) : System.ComponentModel
Dispose ( bool disposing ) : void
GetParameterName ( int parameterOrdinal ) : string
GetParameterName ( string parameterName ) : string
GetParameterPlaceholder ( int parameterOrdinal ) : string
GetSchemaTable ( DbCommand sourceCommand ) : DataTable
InitializeCommand ( DbCommand command ) : DbCommand
RowUpdatingHandler ( RowUpdatingEventArgs rowUpdatingEvent ) : void
SetRowUpdatingHandler ( DbDataAdapter adapter ) : void

Private Methods

Method Description
BuildCache ( bool closeConnection, DataRow dataRow, bool useColumnsForParameterNames ) : void
BuildDeleteCommand ( DataTableMapping mappings, DataRow dataRow ) : DbCommand
BuildInformation ( DataTable schemaTable ) : void
BuildInsertCommand ( DataTableMapping mappings, DataRow dataRow ) : DbCommand
BuildUpdateCommand ( DataTableMapping mappings, DataRow dataRow ) : DbCommand
BuildWhereClause ( DataTableMapping mappings, DataRow dataRow, StringBuilder builder, DbCommand command, int parameterCount, bool isUpdate ) : int
CreateParameterForNullTest ( DbCommand command, string parameterName, string sourceColumn, DataRowVersion version, int parameterCount, object value, DbSchemaRow row, StatementType statementType, bool whereClause ) : string
CreateParameterForValue ( DbCommand command, string parameterName, string sourceColumn, DataRowVersion version, int parameterCount, object value, DbSchemaRow row, StatementType statementType, bool whereClause ) : string
GetBaseParameterName ( int index ) : string
GetColumnValue ( DataRow row, DataColumn column, DataRowVersion version ) : object
GetColumnValue ( DataRow row, string columnName, DataTableMapping mappings, DataRowVersion version ) : object
GetConnection ( ) : DbConnection
GetDataColumn ( string columnName, DataTableMapping tablemapping, DataRow row ) : DataColumn
GetDeleteCommand ( DataRow dataRow, bool useColumnsForParameterNames ) : DbCommand
GetInsertCommand ( DataRow dataRow, bool useColumnsForParameterNames ) : DbCommand
GetNextParameter ( DbCommand command, int pcount ) : DbParameter
GetNullParameterName ( int index ) : string
GetOriginalParameterName ( int index ) : string
GetSelectCommand ( ) : DbCommand
GetTableMapping ( DataRow dataRow ) : DataTableMapping
GetUpdateCommand ( DataRow dataRow, bool useColumnsForParameterNames ) : DbCommand
IncludeInInsertValues ( DbSchemaRow row ) : bool
IncludeInUpdateSet ( DbSchemaRow row ) : bool
IncludeInWhereClause ( DbSchemaRow row, bool isUpdate ) : bool
IncrementWhereCount ( DbSchemaRow row ) : bool
ParseProcedureName ( string name, string quotePrefix, string quoteSuffix ) : string[]
QuotedColumn ( string column ) : string
RemoveExtraParameters ( DbCommand command, int usedParameterCount ) : void
RowUpdatingHandlerBuilder ( RowUpdatingEventArgs rowUpdatingEvent ) : void

Method Details

ApplyParameterInfo() protected abstract method

protected abstract ApplyParameterInfo ( DbParameter parameter, DataRow row, StatementType statementType, bool whereClause ) : void
parameter DbParameter
row DataRow
statementType StatementType
whereClause bool
return void

DbCommandBuilder() protected method

protected DbCommandBuilder ( ) : System.ComponentModel
return System.ComponentModel

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GetDeleteCommand() public method

public GetDeleteCommand ( ) : DbCommand
return DbCommand

GetDeleteCommand() public method

public GetDeleteCommand ( bool useColumnsForParameterNames ) : DbCommand
useColumnsForParameterNames bool
return DbCommand

GetInsertCommand() public method

public GetInsertCommand ( ) : DbCommand
return DbCommand

GetInsertCommand() public method

public GetInsertCommand ( bool useColumnsForParameterNames ) : DbCommand
useColumnsForParameterNames bool
return DbCommand

GetParameterName() protected abstract method

protected abstract GetParameterName ( int parameterOrdinal ) : string
parameterOrdinal int
return string

GetParameterName() protected abstract method

protected abstract GetParameterName ( string parameterName ) : string
parameterName string
return string

GetParameterPlaceholder() protected abstract method

protected abstract GetParameterPlaceholder ( int parameterOrdinal ) : string
parameterOrdinal int
return string

GetSchemaTable() protected method

protected GetSchemaTable ( DbCommand sourceCommand ) : DataTable
sourceCommand DbCommand
return DataTable

GetUpdateCommand() public method

public GetUpdateCommand ( ) : DbCommand
return DbCommand

GetUpdateCommand() public method

public GetUpdateCommand ( bool useColumnsForParameterNames ) : DbCommand
useColumnsForParameterNames bool
return DbCommand

InitializeCommand() protected method

protected InitializeCommand ( DbCommand command ) : DbCommand
command DbCommand
return DbCommand

QuoteIdentifier() public method

public QuoteIdentifier ( string unquotedIdentifier ) : string
unquotedIdentifier string
return string

RefreshSchema() public method

public RefreshSchema ( ) : void
return void

RowUpdatingHandler() protected method

protected RowUpdatingHandler ( RowUpdatingEventArgs rowUpdatingEvent ) : void
rowUpdatingEvent RowUpdatingEventArgs
return void

SetRowUpdatingHandler() protected abstract method

protected abstract SetRowUpdatingHandler ( DbDataAdapter adapter ) : void
adapter DbDataAdapter
return void

UnquoteIdentifier() public method

public UnquoteIdentifier ( string quotedIdentifier ) : string
quotedIdentifier string
return string