ISqlGenerationHelper Interface

Definition

Provides services to help with generation of SQL commands.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public interface ISqlGenerationHelper
type ISqlGenerationHelper = interface
Public Interface ISqlGenerationHelper
Derived

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See Implementation of database providers and extensions for more information and examples.

Properties

BatchTerminator

The terminator to be used for batches of SQL statements.

CommitTransactionStatement

Gets the SQL for a COMMIT statement.

SingleLineCommentToken

The default single-line comment prefix.

StartTransactionStatement

Gets the SQL for a START TRANSACTION statement.

StatementTerminator

The terminator to be used for SQL statements.

Methods

DelimitIdentifier(String)

Generates the delimited SQL representation of an identifier (column name, table name, etc.).

DelimitIdentifier(String, String)

Generates the delimited SQL representation of an identifier (column name, table name, etc.).

DelimitIdentifier(StringBuilder, String)

Writes the delimited SQL representation of an identifier (column name, table name, etc.).

DelimitIdentifier(StringBuilder, String, String)

Writes the delimited SQL representation of an identifier (column name, table name, etc.).

EscapeIdentifier(String)
Obsolete.

Generates the escaped SQL representation of an identifier (column name, table name, etc.).

EscapeIdentifier(StringBuilder, String)
Obsolete.

Writes the escaped SQL representation of an identifier (column name, table name, etc.).

EscapeLiteral(String)
Obsolete.

Generates the escaped SQL representation of a literal value.

EscapeLiteral(StringBuilder, String)
Obsolete.

Writes the escaped SQL representation of a literal value.

GenerateComment(String)

Generates a SQL comment.

GenerateCreateSavepointStatement(String)

Generates an SQL statement which creates a savepoint with the given name.

GenerateLiteral(Object, RelationalTypeMapping)

Generates the SQL representation of a literal value.

GenerateLiteral(StringBuilder, Object, RelationalTypeMapping)

Writes the SQL representation of a literal value.

GenerateParameterName(String)

Generates a valid parameter name for the given candidate name.

GenerateParameterName(StringBuilder, String)

Writes a valid parameter name for the given candidate name.

GenerateParameterNamePlaceholder(String)

Generates a valid parameter placeholder name for the given candidate name.

GenerateParameterNamePlaceholder(StringBuilder, String)

Writes a valid parameter placeholder name for the given candidate name.

GenerateReleaseSavepointStatement(String)

Generates an SQL statement which releases a savepoint with the given name.

GenerateRollbackToSavepointStatement(String)

Generates an SQL statement which rolls back to a savepoint with the given name.

Applies to