• Home
  • Tutorials
  • API
  • Change Log
  • Github

    Show / Hide Table of Contents
    • DotNetHelper.ObjectToSql
      • SqlGenerator
    • DotNetHelper.ObjectToSql.Attribute
      • DbTableAttribute
      • SqlColumnAttribute
    • DotNetHelper.ObjectToSql.Enum
      • ActionType
      • DataBaseType
      • OutputType
      • ScriptType
      • SerializableType
      • SqlJoinType
    • DotNetHelper.ObjectToSql.Exceptions
      • EmptyArgumentException
      • MissingKeyAttributeException
    • DotNetHelper.ObjectToSql.Extension
      • DBConnectionExtension
      • MemberWrapperExtension
    • DotNetHelper.ObjectToSql.Helper
      • DbTypeMap
      • SqlSyntaxHelper
    • DotNetHelper.ObjectToSql.Model
      • SqlTable
    • DotNetHelper.ObjectToSql.Services
      • DataTableToSql
      • ObjectToSql

    Class SqlSyntaxHelper

    Inheritance
    Object
    SqlSyntaxHelper
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: DotNetHelper.ObjectToSql.Helper
    Assembly: DotNetHelper.ObjectToSql.dll
    Syntax
    public class SqlSyntaxHelper

    Constructors

    | Improve this Doc View Source

    SqlSyntaxHelper(DataBaseType)

    Declaration
    public SqlSyntaxHelper(DataBaseType type)
    Parameters
    Type Name Description
    DataBaseType type

    Properties

    | Improve this Doc View Source

    ConstAt

    @

    Declaration
    public char ConstAt { get; }
    Property Value
    Type Description
    Char
    | Improve this Doc View Source

    ConstCloseParens

    )

    Declaration
    public char ConstCloseParens { get; }
    Property Value
    Type Description
    Char
    | Improve this Doc View Source

    ConstInsertInto

    INSERT INTO

    Declaration
    public string ConstInsertInto { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    ConstMySqlOnDupeKeyUpdate

    ON DUPLICATE KEY UPDATE

    Declaration
    public string ConstMySqlOnDupeKeyUpdate { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    ConstNull

    NULL

    Declaration
    public string ConstNull { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    ConstOpenParens

    (

    Declaration
    public char ConstOpenParens { get; }
    Property Value
    Type Description
    Char
    | Improve this Doc View Source

    ConstSqlServerSelectTop1

    SELECT TOP 1 * FROM

    Declaration
    public string ConstSqlServerSelectTop1 { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    ConstValues

    Declaration
    public string ConstValues { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    DataBaseType

    Declaration
    public DataBaseType DataBaseType { get; }
    Property Value
    Type Description
    DataBaseType
    | Improve this Doc View Source

    EnclosedValueLookup

    Declaration
    public Dictionary<Type, string> EnclosedValueLookup { get; }
    Property Value
    Type Description
    Dictionary<Type, String>

    Methods

    | Improve this Doc View Source

    BuildIfExistStatement(String, String, String)

    Declaration
    public string BuildIfExistStatement(string selectStatement, string onTrueSql, string onFalseSql)
    Parameters
    Type Name Description
    String selectStatement
    String onTrueSql
    String onFalseSql
    Returns
    Type Description
    String
    | Improve this Doc View Source

    BuildTableExistStatement(SqlTable, String, String)

    Declaration
    public string BuildTableExistStatement(SqlTable sqlTable, string onTrueSql, string onFalseSql)
    Parameters
    Type Name Description
    SqlTable sqlTable
    String onTrueSql
    String onFalseSql
    Returns
    Type Description
    String
    | Improve this Doc View Source

    ConvertParameterSqlToReadable<T>(List<T>, String, Encoding)

    Converts a A parameterized query to a readable query.

    Declaration
    public string ConvertParameterSqlToReadable<T>(List<T> parameters, string query, Encoding encoding)
    
        where T : DbParameter
    Parameters
    Type Name Description
    List<T> parameters

    a list of dbparameters that is included in your parameterized query

    String query

    A parameterized query

    Encoding encoding

    Only used for properties of the type byte[]

    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    EscapeSqlValue(Object, Encoding)

    return the value escaped for valid sql

    Declaration
    public string EscapeSqlValue(object obj, Encoding encoding)
    Parameters
    Type Name Description
    Object obj
    Encoding encoding
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetEnclosedValueChar(Type)

    Declaration
    public string GetEnclosedValueChar(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetKeywordEscapeClosedChar()

    Declaration
    public string GetKeywordEscapeClosedChar()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetKeywordEscapeOpenChar()

    Declaration
    public string GetKeywordEscapeOpenChar()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    RemoveKeywordEscapeChars(String)

    Declaration
    public string RemoveKeywordEscapeChars(string value)
    Parameters
    Type Name Description
    String value
    Returns
    Type Description
    String
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Joseph McNeal Jr