IDbFormatter

Allows implementers to provide SQL queries formatting capabilities.

Namespace:
Inetdev.Data
Type:
Interface
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
Yes

Properties

CatalogSeparator

Get the catalog separator string.

Signature:
public String CatalogSeparator { get; }

QuoteIdentifierPrefix

Get the prefix string used to quote identifiers.

Signature:
public String QuoteIdentifierPrefix { get; }

QuoteIdentifierSuffix

Get the suffix string used to quote identifiers.

Signature:
public String QuoteIdentifierSuffix { get; }

QuoteParamPrefix

Get the prefix string used to quote parameters.

Signature:
public String QuoteParamPrefix { get; }

QuoteParamSuffix

Get the suffix string used to quote parameters.

Signature:
public String QuoteParamSuffix { get; }

SchemaSeparator

Get the schema separator string.

Signature:
public String SchemaSeparator { get; }

Methods

FormatValue

Formats a value to be included within a statement.

Signature:
public String FormatValue(dataType, value)
Returns

A textual representation of value.

Parameters
Name Type Summary
dataType DbType The data type of the value.
value Object Value to be formatted.

GetComparisonOperator

Get the string for the specified operator.

Signature:
public String GetComparisonOperator(op)
Returns

A string representation of the operator.

Parameters
Name Type Summary
op ComparisonOperator The operator to retrieve.

GetDbDateTimeString

Get a string representation of the database instruction to retrieve the current database server date time.

Signature:
public String GetDbDateTimeString()
Returns

System date-time command string.

Example
This method returns GETDATE() for SQL Server, SYSDATE for Oracle, etc.

GetDbType

Get the string for the specified data type.

Signature:
public String GetDbType(type)
Returns

A string representation of the data type.

Parameters
Name Type Summary
type DbType The data type to get the string of.

GetRelationalOperator

Get the string for the specified operator.

Signature:
public String GetRelationalOperator(op)
Returns

A string representation of the operator.

Parameters
Name Type Summary
op RelationalOperator The operator to retrieve.

QuoteIdentifier

Quote the specified identifier.

Signature:
public String QuoteIdentifier(identifier)
Returns

The quoted identifier.

Parameters
Name Type Summary
identifier String The identifier to quote.

QuoteParameter

Quote the specified parameter name.

Signature:
public String QuoteParameter(paramName)
Returns

The quoted parameter.

Parameters
Name Type Summary
paramName String The name of the parameter to quote.

UnquoteIdentifier

Unquote the specified quoted identifier.

Signature:
public String UnquoteIdentifier(quotedIdentifier)
Returns

The unquoted identifier.

Parameters
Name Type Summary
quotedIdentifier String The quoted identifier to unquote.

UnquoteParameter

Unquote the specified quoted parameter.

Signature:
public String UnquoteParameter(quotedParameter)
Returns

The unquoted parameter.

Parameters
Name Type Summary
quotedParameter String The quoted parameter to unquote.