ISqlGenerationHelper ISqlGenerationHelper Interface

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.

Syntax

Declaration

public interface ISqlGenerationHelperPublic Interface ISqlGenerationHelper

Properties summary

The terminator to be used for batches of SQL statements.

The terminator to be used for SQL statements.

Methods summary

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

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

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

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

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

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

Generates the escaped SQL representation of a literal value.

Writes the escaped SQL representation of a literal value.

Generates the SQL representation of a literal value.

Writes the SQL representation of a literal value.

Generates a valid parameter name for the given candidate name.

Writes a valid parameter name for the given candidate name.

Properties

  • BatchTerminator
    BatchTerminator

    The terminator to be used for batches of SQL statements.

    string BatchTerminator { get; }ReadOnly Property BatchTerminator As String

    Property Value

    • System.String
      System.String
  • StatementTerminator
    StatementTerminator

    The terminator to be used for SQL statements.

    string StatementTerminator { get; }ReadOnly Property StatementTerminator As String

    Property Value

    • System.String
      System.String

Methods

  • DelimitIdentifier(String)
    DelimitIdentifier(String)

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

    string DelimitIdentifier(string identifier)Function DelimitIdentifier(identifier As String) As String

    Parameters

    • identifier
      System.String
      System.String

      The identifier to delimit.

    Returns

    • System.String
      System.String

      The generated string.

  • DelimitIdentifier(String, String)
    DelimitIdentifier(String, String)

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

    string DelimitIdentifier(string name, string schema)Function DelimitIdentifier(name As String, schema As String) As String

    Parameters

    • name
      System.String
      System.String

      The identifier to delimit.

    • schema
      System.String
      System.String

      The schema of the identifier.

    Returns

    • System.String
      System.String

      The generated string.

  • DelimitIdentifier(StringBuilder, String)
    DelimitIdentifier(StringBuilder, String)

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

    void DelimitIdentifier(StringBuilder builder, string identifier)Sub DelimitIdentifier(builder As StringBuilder, identifier As String)

    Parameters

    • builder
      System.Text.StringBuilder
      System.Text.StringBuilder

      The System.Text.StringBuilder to write generated string to.

    • identifier
      System.String
      System.String

      The identifier to delimit.

  • DelimitIdentifier(StringBuilder, String, String)
    DelimitIdentifier(StringBuilder, String, String)

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

    void DelimitIdentifier(StringBuilder builder, string name, string schema)Sub DelimitIdentifier(builder As StringBuilder, name As String, schema As String)

    Parameters

    • builder
      System.Text.StringBuilder
      System.Text.StringBuilder

      The System.Text.StringBuilder to write generated string to.

    • name
      System.String
      System.String

      The identifier to delimit.

    • schema
      System.String
      System.String

      The schema of the identifier.

  • EscapeIdentifier(String)
    EscapeIdentifier(String)

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

    string EscapeIdentifier(string identifier)Function EscapeIdentifier(identifier As String) As String

    Parameters

    • identifier
      System.String
      System.String

      The identifier to be escaped.

    Returns

    • System.String
      System.String

      The generated string.

  • EscapeIdentifier(StringBuilder, String)
    EscapeIdentifier(StringBuilder, String)

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

    void EscapeIdentifier(StringBuilder builder, string identifier)Sub EscapeIdentifier(builder As StringBuilder, identifier As String)

    Parameters

    • builder
      System.Text.StringBuilder
      System.Text.StringBuilder

      The System.Text.StringBuilder to write generated string to.

    • identifier
      System.String
      System.String

      The identifier to be escaped.

  • EscapeLiteral(String)
    EscapeLiteral(String)

    Generates the escaped SQL representation of a literal value.

    string EscapeLiteral(string literal)Function EscapeLiteral(literal As String) As String

    Parameters

    • literal
      System.String
      System.String

      The value to be escaped.

    Returns

    • System.String
      System.String

      The generated string.

  • EscapeLiteral(StringBuilder, String)
    EscapeLiteral(StringBuilder, String)

    Writes the escaped SQL representation of a literal value.

    void EscapeLiteral(StringBuilder builder, string literal)Sub EscapeLiteral(builder As StringBuilder, literal As String)

    Parameters

    • builder
      System.Text.StringBuilder
      System.Text.StringBuilder

      The System.Text.StringBuilder to write generated string to.

    • literal
      System.String
      System.String

      The value to be escaped.

  • GenerateLiteral(Object, RelationalTypeMapping)
    GenerateLiteral(Object, RelationalTypeMapping)

    Generates the SQL representation of a literal value.

    string GenerateLiteral(object value, RelationalTypeMapping typeMapping = null)Function GenerateLiteral(value As Object, typeMapping As RelationalTypeMapping = Nothing) As String

    Parameters

    Returns

    • System.String
      System.String

      The generated string.

  • GenerateLiteral(StringBuilder, Object, RelationalTypeMapping)
    GenerateLiteral(StringBuilder, Object, RelationalTypeMapping)

    Writes the SQL representation of a literal value.

    void GenerateLiteral(StringBuilder builder, object value, RelationalTypeMapping typeMapping = null)Sub GenerateLiteral(builder As StringBuilder, value As Object, typeMapping As RelationalTypeMapping = Nothing)

    Parameters

    • builder
      System.Text.StringBuilder
      System.Text.StringBuilder

      The System.Text.StringBuilder to write generated string to.

    • value
      System.Object
      System.Object

      The literal value.

    • typeMapping

      An optional type mapping that is used for this value.

  • GenerateParameterName(String)
    GenerateParameterName(String)

    Generates a valid parameter name for the given candidate name.

    string GenerateParameterName(string name)Function GenerateParameterName(name As String) As String

    Parameters

    • name
      System.String
      System.String

      The candidate name for the parameter.

    Returns

    • System.String
      System.String

      A valid name based on the candidate name.

  • GenerateParameterName(StringBuilder, String)
    GenerateParameterName(StringBuilder, String)

    Writes a valid parameter name for the given candidate name.

    void GenerateParameterName(StringBuilder builder, string name)Sub GenerateParameterName(builder As StringBuilder, name As String)

    Parameters

    • builder
      System.Text.StringBuilder
      System.Text.StringBuilder

      The System.Text.StringBuilder to write generated string to.

    • name
      System.String
      System.String

      The candidate name for the parameter.

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll