Search Results for

    Show / Hide Table of Contents

    Class Sql

    Inheritance
    object
    Sql
    Namespace: LinqToDB
    Assembly: linq2db.dll
    Syntax
    public static class Sql

    Fields

    | Improve this Doc View Source

    GroupBy

    Declaration
    public static Sql.IGroupBy GroupBy
    Field Value
    Type Description
    Sql.IGroupBy

    Properties

    | Improve this Doc View Source

    CurrentTimestamp

    Declaration
    [Sql.Property("CURRENT_TIMESTAMP", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Property("Firebird", "LOCALTIMESTAMP", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Property("Informix", "CURRENT", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Property("Access", "Now", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Function("SqlCe", "GetDate", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Function("Sybase", "GetDate", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Function("ClickHouse", "now", ServerSideOnly = true, CanBeNull = false)]
    public static DateTime CurrentTimestamp { get; }
    Property Value
    Type Description
    DateTime
    | Improve this Doc View Source

    CurrentTimestamp2

    Declaration
    [Sql.Property("CURRENT_TIMESTAMP", CanBeNull = false)]
    [Sql.Property("Informix", "CURRENT", CanBeNull = false)]
    [Sql.Property("Access", "Now", CanBeNull = false)]
    [Sql.Function("SqlCe", "GetDate", CanBeNull = false)]
    [Sql.Function("Sybase", "GetDate", CanBeNull = false)]
    [Sql.Function("ClickHouse", "now", CanBeNull = false)]
    public static DateTime CurrentTimestamp2 { get; }
    Property Value
    Type Description
    DateTime
    | Improve this Doc View Source

    CurrentTimestampUtc

    Declaration
    [Sql.Function("SqlServer", "SYSUTCDATETIME", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Function("Sybase", "GETUTCDATE", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Expression("SQLite", "DATETIME('now')", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Function("MySql", "UTC_TIMESTAMP", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Expression("PostgreSQL", "timezone('UTC', now())", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Expression("DB2", "CURRENT TIMESTAMP - CURRENT TIMEZONE", ServerSideOnly = true, CanBeNull = false, Precedence = 70)]
    [Sql.Expression("Oracle", "SYS_EXTRACT_UTC(SYSTIMESTAMP)", ServerSideOnly = true, CanBeNull = false, Precedence = 60)]
    [Sql.Property("SapHana", "CURRENT_UTCTIMESTAMP", ServerSideOnly = true, CanBeNull = false, Precedence = 60)]
    [Sql.Expression("Informix", "datetime(1970-01-01 00:00:00) year to second + (dbinfo('utc_current')/86400)::int::char(9)::interval day(9) to day + (mod(dbinfo('utc_current'), 86400))::char(5)::interval second(5) to second", ServerSideOnly = true, CanBeNull = false, Precedence = 60)]
    [Sql.Expression("ClickHouse", "now('UTC')", ServerSideOnly = true, CanBeNull = false)]
    public static DateTime CurrentTimestampUtc { get; }
    Property Value
    Type Description
    DateTime
    | Improve this Doc View Source

    CurrentTzTimestamp

    Declaration
    [Sql.Function("SqlServer", "SYSDATETIMEOFFSET", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Function("PostgreSQL", "now", ServerSideOnly = true, CanBeNull = false)]
    [Sql.Property("Oracle", "SYSTIMESTAMP", ServerSideOnly = true, CanBeNull = false, Precedence = 60)]
    [Sql.Function("ClickHouse", "now", ServerSideOnly = true, CanBeNull = false)]
    public static DateTimeOffset CurrentTzTimestamp { get; }
    Property Value
    Type Description
    DateTimeOffset
    | Improve this Doc View Source

    DateFirst

    Declaration
    [Sql.Property("@@DATEFIRST", CanBeNull = false)]
    [Sql.Property("ClickHouse", "1", CanBeNull = false)]
    public static int DateFirst { get; }
    Property Value
    Type Description
    int
    | Improve this Doc View Source

    Ext

    Declaration
    public static Sql.ISqlExtension? Ext { get; }
    Property Value
    Type Description
    Sql.ISqlExtension

    Methods

    | Improve this Doc View Source

    Abs(decimal?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Abs(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Abs(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Abs(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Abs(short?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static short? Abs(short? value)
    Parameters
    Type Name Description
    short? value
    Returns
    Type Description
    short?
    | Improve this Doc View Source

    Abs(int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Abs(int? value)
    Parameters
    Type Name Description
    int? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Abs(long?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static long? Abs(long? value)
    Parameters
    Type Name Description
    long? value
    Returns
    Type Description
    long?
    | Improve this Doc View Source

    Abs(sbyte?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static sbyte? Abs(sbyte? value)
    Parameters
    Type Name Description
    sbyte? value
    Returns
    Type Description
    sbyte?
    | Improve this Doc View Source

    Abs(float?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static float? Abs(float? value)
    Parameters
    Type Name Description
    float? value
    Returns
    Type Description
    float?
    | Improve this Doc View Source

    Acos(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Acos(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    AliasExpr()

    Useful for specifying place of alias when using FromSql<TEntity>(IDataContext, RawSqlString, params object?[]) method.

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableSourceBuilder), ServerSideOnly = true)]
    public static ISqlExpression AliasExpr()
    Returns
    Type Description
    ISqlExpression

    ISqlExpression which is Alias Placeholder.

    Remarks

    If FromSql<TEntity>(IDataContext, RawSqlString, params object?[]) contains at least one AliasExpr(), automatic alias for the query will be not generated.

    Examples

    The following FromSql<TEntity>(IDataContext, RawSqlString, params object?[]) calls are equivalent.

    db.FromSql<int>($"select 1 as value from TableA {Sql.AliasExpr()}")
    db.FromSql<int>($"select 1 as value from TableA")
    | Improve this Doc View Source

    AllColumns()

    Generates '*'.

    Declaration
    [Sql.Expression("*", ServerSideOnly = true, CanBeNull = false, Precedence = 100)]
    public static object?[] AllColumns()
    Returns
    Type Description
    object[]
    | Improve this Doc View Source

    Asin(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Asin(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    AsNotNull<T>(T)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, CanBeNull = false)]
    public static T AsNotNull<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AsNotNullable<T>(T)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, CanBeNull = false)]
    public static T AsNotNullable<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AsNullable<T>(T)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, CanBeNull = true)]
    public static T AsNullable<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AsSql<T>(T)

    Enforces generating SQL even if an expression can be calculated locally.

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, ServerSideOnly = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static T AsSql<T>(T obj)
    Parameters
    Type Name Description
    T obj

    Expression to generate SQL.

    Returns
    Type Description
    T

    Returns 'obj'.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Atan(double?)

    Declaration
    [Sql.Function("Access", "Atn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Atan(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Atan2(double?, double?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function("SqlServer", "Atn2", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("DB2", "Atan2", new int[] { 1, 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SqlCe", "Atn2", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Sybase", "Atn2", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Atan2(double? x, double? y)
    Parameters
    Type Name Description
    double? x
    double? y
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Between<T>(T, T, T)

    Declaration
    [Sql.Extension("", "", PreferServerSide = true, IsPredicate = true, BuilderType = typeof(Sql.BetweenBuilder))]
    public static bool Between<T>(this T value, T low, T high) where T : IComparable
    Parameters
    Type Name Description
    T value
    T low
    T high
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Between<T>(T?, T?, T?)

    Declaration
    [Sql.Extension("", "", PreferServerSide = true, IsPredicate = true, BuilderType = typeof(Sql.BetweenBuilder))]
    public static bool Between<T>(this T? value, T? low, T? high) where T : struct, IComparable
    Parameters
    Type Name Description
    T? value
    T? low
    T? high
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Ceiling(decimal?)

    Declaration
    [Sql.Function("Informix", "Ceil", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Oracle", "Ceil", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Ceil", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Ceiling(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Ceiling(double?)

    Declaration
    [Sql.Function("Informix", "Ceil", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Oracle", "Ceil", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Ceil", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Ceiling(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    CharIndex(char?, string?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("DB2", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("MySql", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Locate", new int[] { 1, 0, 2 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "positionUTF8({1}, {0}, toUInt32({2}))", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Firebird", "Position", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? CharIndex(char? value, string? str, int? start)
    Parameters
    Type Name Description
    char? value
    string str
    int? start
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    CharIndex(char?, string?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("DB2", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("MySql", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Locate", new int[] { 1, 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "positionUTF8", new int[] { 1, 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Firebird", "Position", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? CharIndex(char? value, string? str)
    Parameters
    Type Name Description
    char? value
    string str
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    CharIndex(string?, string?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("DB2", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("MySql", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Firebird", "Position", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "positionUTF8({1}, {0}, toUInt32({2}))", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SapHana", "Locate(Substring({1},{2} + 1),{0}) + {2}", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? CharIndex(string? substring, string? str, int? start)
    Parameters
    Type Name Description
    string substring
    string str
    int? start
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    CharIndex(string?, string?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("DB2", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("MySql", "Locate", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Locate", new int[] { 1, 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Firebird", "Position", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "positionUTF8", new int[] { 1, 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? CharIndex(string? substring, string? str)
    Parameters
    Type Name Description
    string substring
    string str
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Collate(string?, string)

    Apply collation to a string expression.

    Declaration
    [Sql.Extension("", ServerSideOnly = true, BuilderType = typeof(Sql.DB2LUWCollationBuilder), Configuration = "DB2.LUW")]
    [Sql.Extension("", ServerSideOnly = true, BuilderType = typeof(Sql.PostgreSQLCollationBuilder), Configuration = "PostgreSQL")]
    [Sql.Extension("", ServerSideOnly = true, BuilderType = typeof(Sql.NamedCollationBuilder))]
    public static string? Collate(this string? expr, string collation)
    Parameters
    Type Name Description
    string expr

    Expression to apply collation to.

    string collation

    Collation to apply.

    Returns
    Type Description
    string

    Expression with specified collation.

    Remarks

    Server-side only, does not perform validation on collation name beyond simple valid character checks.

    | Improve this Doc View Source

    Concat(params object[])

    Declaration
    public static string Concat(params object[] args)
    Parameters
    Type Name Description
    object[] args
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Concat(params string[])

    Declaration
    public static string Concat(params string[] args)
    Parameters
    Type Name Description
    string[] args
    Returns
    Type Description
    string
    | Improve this Doc View Source

    ConcatStrings(string, params string?[])

    Concatenates NOT NULL strings, using the specified separator between each member.

    Declaration
    [Sql.Extension("SqlServer.2022", "CONCAT_WS({separator}, {argument, ', '})", BuilderType = typeof(Sql.CommonConcatWsArgumentsBuilder), BuilderValue = "ISNULL({0}, '')")]
    [Sql.Extension("SqlServer.2019", "CONCAT_WS({separator}, {argument, ', '})", BuilderType = typeof(Sql.CommonConcatWsArgumentsBuilder), BuilderValue = "ISNULL({0}, '')")]
    [Sql.Extension("SqlServer.2017", "CONCAT_WS({separator}, {argument, ', '})", BuilderType = typeof(Sql.CommonConcatWsArgumentsBuilder), BuilderValue = "ISNULL({0}, '')")]
    [Sql.Extension("PostgreSQL", "CONCAT_WS({separator}, {argument, ', '})", BuilderType = typeof(Sql.CommonConcatWsArgumentsBuilder), BuilderValue = null)]
    [Sql.Extension("MySql", "CONCAT_WS({separator}, {argument, ', '})", BuilderType = typeof(Sql.CommonConcatWsArgumentsBuilder), BuilderValue = null)]
    [Sql.Extension("SqlServer", "", BuilderType = typeof(Sql.OldSqlServerConcatWsBuilder))]
    [Sql.Extension("SQLite", "", BuilderType = typeof(Sql.SqliteConcatWsBuilder))]
    [Sql.Extension("ClickHouse", "arrayStringConcat([{arguments, ', '}], {separator})", CanBeNull = false)]
    public static string ConcatStrings(string separator, params string?[] arguments)
    Parameters
    Type Name Description
    string separator

    The string to use as a separator. separator is included in the returned string only if arguments has more than one element.

    string[] arguments

    A collection that contains the strings to concatenate.

    Returns
    Type Description
    string
    | Improve this Doc View Source

    Convert<TTo, TFrom>(TTo, TFrom, int)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function("Convert", new int[] { 0, 1, 2 }, ServerSideOnly = true, IsNullable = Sql.IsNullableType.SameAsSecondParameter)]
    public static TTo Convert<TTo, TFrom>(TTo to, TFrom from, int format)
    Parameters
    Type Name Description
    TTo to
    TFrom from
    int format
    Returns
    Type Description
    TTo
    Type Parameters
    Name Description
    TTo
    TFrom
    | Improve this Doc View Source

    Convert<TTo, TFrom>(TTo, TFrom)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function("Convert", new int[] { 0, 1 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.SameAsSecondParameter)]
    [Sql.Function("$Convert$", new int[] { 2, 3, 1 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.SameAsSecondParameter, Configuration = "ClickHouse")]
    public static TTo Convert<TTo, TFrom>(TTo to, TFrom from)
    Parameters
    Type Name Description
    TTo to
    TFrom from
    Returns
    Type Description
    TTo
    Type Parameters
    Name Description
    TTo
    TFrom
    | Improve this Doc View Source

    Convert<TTo, TFrom>(TFrom)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function("$Convert$", new int[] { 1, 2, 0 }, IsPure = true)]
    public static TTo Convert<TTo, TFrom>(TFrom obj)
    Parameters
    Type Name Description
    TFrom obj
    Returns
    Type Description
    TTo
    Type Parameters
    Name Description
    TTo
    TFrom
    | Improve this Doc View Source

    Convert2<TTo, TFrom>(TTo, TFrom)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function("Convert", new int[] { 0, 1 }, IsPure = true, IsNullable = Sql.IsNullableType.SameAsSecondParameter)]
    [Sql.Function("$Convert$", new int[] { 2, 3, 1 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.SameAsSecondParameter, Configuration = "ClickHouse")]
    public static TTo Convert2<TTo, TFrom>(TTo to, TFrom from)
    Parameters
    Type Name Description
    TTo to
    TFrom from
    Returns
    Type Description
    TTo
    Type Parameters
    Name Description
    TTo
    TFrom
    | Improve this Doc View Source

    Cos(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Cos(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Cosh(double?)

    Declaration
    [Sql.Function("ClickHouse", "cosh", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Cosh(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Cot(double?)

    Declaration
    [Sql.Expression("ClickHouse", "1/tan({0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable, Precedence = 80)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Cot(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    DateAdd(DateParts, double?, DateTime?)

    Declaration
    [Sql.Extension("DateAdd", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilder))]
    [Sql.Extension("Oracle", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderOracle))]
    [Sql.Extension("DB2", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderDB2))]
    [Sql.Extension("Informix", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderInformix))]
    [Sql.Extension("PostgreSQL", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderPostgreSQL))]
    [Sql.Extension("MySql", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderMySql))]
    [Sql.Extension("SQLite", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderSQLite))]
    [Sql.Extension("Access", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderAccess))]
    [Sql.Extension("SapHana", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderSapHana))]
    [Sql.Extension("Firebird", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderFirebird))]
    [Sql.Extension("ClickHouse", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderClickHouse))]
    public static DateTime? DateAdd(Sql.DateParts part, double? number, DateTime? date)
    Parameters
    Type Name Description
    Sql.DateParts part
    double? number
    DateTime? date
    Returns
    Type Description
    DateTime?
    | Improve this Doc View Source

    DateAdd(DateParts, double?, DateTimeOffset?)

    Declaration
    [Sql.Extension("DateAdd", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateOffsetAddBuilder))]
    [Sql.Extension("PostgreSQL", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateOffsetAddBuilderPostgreSQL))]
    [Sql.Extension("Oracle", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderOracle))]
    [Sql.Extension("DB2", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderDB2))]
    [Sql.Extension("Informix", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderInformix))]
    [Sql.Extension("MySql", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderMySql))]
    [Sql.Extension("SQLite", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderSQLite))]
    [Sql.Extension("Access", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderAccess))]
    [Sql.Extension("SapHana", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderSapHana))]
    [Sql.Extension("Firebird", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderFirebird))]
    [Sql.Extension("ClickHouse", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DateAddBuilderClickHouse))]
    public static DateTimeOffset? DateAdd(Sql.DateParts part, double? number, DateTimeOffset? date)
    Parameters
    Type Name Description
    Sql.DateParts part
    double? number
    DateTimeOffset? date
    Returns
    Type Description
    DateTimeOffset?
    | Improve this Doc View Source

    DateDiff(DateParts, DateTime?, DateTime?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Extension("DateDiff", BuilderType = typeof(Sql.DateDiffBuilder))]
    [Sql.Extension("MySql", "TIMESTAMPDIFF", BuilderType = typeof(Sql.DateDiffBuilder))]
    [Sql.Extension("DB2", "", BuilderType = typeof(Sql.DateDiffBuilderDB2))]
    [Sql.Extension("SapHana", "", BuilderType = typeof(Sql.DateDiffBuilderSapHana))]
    [Sql.Extension("SQLite", "", BuilderType = typeof(Sql.DateDiffBuilderSQLite))]
    [Sql.Extension("Oracle", "", BuilderType = typeof(Sql.DateDiffBuilderOracle))]
    [Sql.Extension("PostgreSQL", "", BuilderType = typeof(Sql.DateDiffBuilderPostgreSql))]
    [Sql.Extension("Access", "", BuilderType = typeof(Sql.DateDiffBuilderAccess))]
    [Sql.Extension("ClickHouse", "", BuilderType = typeof(Sql.DateDiffBuilderClickHouse))]
    public static int? DateDiff(Sql.DateParts part, DateTime? startDate, DateTime? endDate)
    Parameters
    Type Name Description
    Sql.DateParts part
    DateTime? startDate
    DateTime? endDate
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    DateDiff(DateParts, DateTimeOffset?, DateTimeOffset?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Extension("DateDiff", BuilderType = typeof(Sql.DateDiffBuilder))]
    [Sql.Extension("MySql", "TIMESTAMPDIFF", BuilderType = typeof(Sql.DateDiffBuilder))]
    [Sql.Extension("DB2", "", BuilderType = typeof(Sql.DateDiffBuilderDB2))]
    [Sql.Extension("SapHana", "", BuilderType = typeof(Sql.DateDiffBuilderSapHana))]
    [Sql.Extension("SQLite", "", BuilderType = typeof(Sql.DateDiffBuilderSQLite))]
    [Sql.Extension("PostgreSQL", "", BuilderType = typeof(Sql.DateDiffBuilderPostgreSql))]
    [Sql.Extension("Access", "", BuilderType = typeof(Sql.DateDiffBuilderAccess))]
    [Sql.Extension("ClickHouse", "", BuilderType = typeof(Sql.DateDiffBuilderClickHouse))]
    public static int? DateDiff(Sql.DateParts part, DateTimeOffset? startDate, DateTimeOffset? endDate)
    Parameters
    Type Name Description
    Sql.DateParts part
    DateTimeOffset? startDate
    DateTimeOffset? endDate
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    DatePart(DateParts, DateTime?)

    Declaration
    [Sql.Extension("DatePart", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilder))]
    [Sql.Extension("DB2", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderDB2))]
    [Sql.Extension("Informix", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderInformix))]
    [Sql.Extension("MySql", "Extract({part} from {date})", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderMySql))]
    [Sql.Extension("PostgreSQL", "Cast(Floor(Extract({part} from {date})) as int)", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderPostgre))]
    [Sql.Extension("Firebird", "Cast(Floor(Extract({part} from {date})) as int)", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderFirebird))]
    [Sql.Extension("SQLite", "Cast(StrFTime('%{part}', {date}) as int)", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderSqLite))]
    [Sql.Extension("Access", "DatePart('{part}', {date})", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderAccess))]
    [Sql.Extension("SapHana", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderSapHana))]
    [Sql.Extension("Oracle", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderOracle))]
    [Sql.Extension("ClickHouse", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderClickHouse))]
    public static int? DatePart(Sql.DateParts part, DateTime? date)
    Parameters
    Type Name Description
    Sql.DateParts part
    DateTime? date
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    DatePart(DateParts, DateTimeOffset?)

    Declaration
    [Sql.Extension("DatePart", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilder))]
    [Sql.Extension("DB2", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderDB2))]
    [Sql.Extension("Informix", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderInformix))]
    [Sql.Extension("MySql", "Extract({part} from {date})", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderMySql))]
    [Sql.Extension("PostgreSQL", "Cast(Floor(Extract({part} from {date})) as int)", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderPostgre))]
    [Sql.Extension("Firebird", "Cast(Floor(Extract({part} from {date})) as int)", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderFirebird))]
    [Sql.Extension("SQLite", "Cast(StrFTime('%{part}', {date}) as int)", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderSqLite))]
    [Sql.Extension("Access", "DatePart('{part}', {date})", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderAccess))]
    [Sql.Extension("SapHana", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderSapHana))]
    [Sql.Extension("Oracle", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderOracle))]
    [Sql.Extension("ClickHouse", "", ServerSideOnly = false, PreferServerSide = false, BuilderType = typeof(Sql.DatePartBuilderClickHouse))]
    public static int? DatePart(Sql.DateParts part, DateTimeOffset? date)
    Parameters
    Type Name Description
    Sql.DateParts part
    DateTimeOffset? date
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    DateToTime(DateTime?)

    Declaration
    [Sql.Expression("{0}", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static TimeSpan? DateToTime(DateTime? date)
    Parameters
    Type Name Description
    DateTime? date
    Returns
    Type Description
    TimeSpan?
    | Improve this Doc View Source

    Default<T>()

    Generates 'DEFAULT' keyword, usable in inserts.

    Declaration
    [Sql.Expression("DEFAULT", ServerSideOnly = true)]
    public static T Default<T>()
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Degrees(decimal?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Degrees(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Degrees(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Degrees(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Degrees(short?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static short? Degrees(short? value)
    Parameters
    Type Name Description
    short? value
    Returns
    Type Description
    short?
    | Improve this Doc View Source

    Degrees(int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Degrees(int? value)
    Parameters
    Type Name Description
    int? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Degrees(long?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static long? Degrees(long? value)
    Parameters
    Type Name Description
    long? value
    Returns
    Type Description
    long?
    | Improve this Doc View Source

    Degrees(sbyte?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static sbyte? Degrees(sbyte? value)
    Parameters
    Type Name Description
    sbyte? value
    Returns
    Type Description
    sbyte?
    | Improve this Doc View Source

    Degrees(float?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static float? Degrees(float? value)
    Parameters
    Type Name Description
    float? value
    Returns
    Type Description
    float?
    | Improve this Doc View Source

    Exp(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Exp(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Expr<T>(RawSqlString, params object[])

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.ExprBuilder), ServerSideOnly = true)]
    public static T Expr<T>(RawSqlString sql, params object[] parameters)
    Parameters
    Type Name Description
    RawSqlString sql
    object[] parameters
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FieldExpr(object, bool)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilder), ServerSideOnly = true)]
    public static ISqlExpression FieldExpr(object fieldExpr, bool qualified)
    Parameters
    Type Name Description
    object fieldExpr
    bool qualified
    Returns
    Type Description
    ISqlExpression
    | Improve this Doc View Source

    FieldExpr(object)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilder), ServerSideOnly = true)]
    public static ISqlExpression FieldExpr(object fieldExpr)
    Parameters
    Type Name Description
    object fieldExpr
    Returns
    Type Description
    ISqlExpression
    | Improve this Doc View Source

    FieldExpr<T, TV>(ITable<T>, Expression<Func<T, TV>>, bool)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilderDirect), ServerSideOnly = false)]
    public static ISqlExpression FieldExpr<T, TV>(ITable<T> table, Expression<Func<T, TV>> fieldExpr, bool qualified) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Expression<Func<T, TV>> fieldExpr
    bool qualified
    Returns
    Type Description
    ISqlExpression
    Type Parameters
    Name Description
    T
    TV
    | Improve this Doc View Source

    FieldExpr<T, TV>(ITable<T>, Expression<Func<T, TV>>)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilderDirect), ServerSideOnly = false)]
    public static ISqlExpression FieldExpr<T, TV>(ITable<T> table, Expression<Func<T, TV>> fieldExpr) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Expression<Func<T, TV>> fieldExpr
    Returns
    Type Description
    ISqlExpression
    Type Parameters
    Name Description
    T
    TV
    | Improve this Doc View Source

    FieldName(object, bool)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilder), ServerSideOnly = true)]
    public static string FieldName(object fieldExpr, bool qualified)
    Parameters
    Type Name Description
    object fieldExpr
    bool qualified
    Returns
    Type Description
    string
    | Improve this Doc View Source

    FieldName(object)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilder), ServerSideOnly = true)]
    public static string FieldName(object fieldExpr)
    Parameters
    Type Name Description
    object fieldExpr
    Returns
    Type Description
    string
    | Improve this Doc View Source

    FieldName<T>(ITable<T>, Expression<Func<T, object>>, bool)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilderDirect), ServerSideOnly = false)]
    public static string FieldName<T>(ITable<T> table, Expression<Func<T, object>> fieldExpr, bool qualified) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Expression<Func<T, object>> fieldExpr
    bool qualified
    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FieldName<T>(ITable<T>, Expression<Func<T, object>>)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.FieldNameBuilderDirect), ServerSideOnly = false)]
    public static string FieldName<T>(ITable<T> table, Expression<Func<T, object>> fieldExpr) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Expression<Func<T, object>> fieldExpr
    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Floor(decimal?)

    Declaration
    [Sql.Function("Access", "Int", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Floor(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Floor(double?)

    Declaration
    [Sql.Function("Access", "Int", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Floor(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    GetDate()

    Declaration
    [Sql.Property("CURRENT_TIMESTAMP", CanBeNull = false)]
    [Sql.Property("Informix", "CURRENT", CanBeNull = false)]
    [Sql.Property("Access", "Now", CanBeNull = false)]
    [Sql.Function("ClickHouse", "now", CanBeNull = false)]
    public static DateTime GetDate()
    Returns
    Type Description
    DateTime
    | Improve this Doc View Source

    Grouping(params object[])

    Declaration
    [Sql.Extension("GROUPING({fields, ', '})", ServerSideOnly = true, CanBeNull = false, IsAggregate = true)]
    public static int Grouping(params object[] fields)
    Parameters
    Type Name Description
    object[] fields
    Returns
    Type Description
    int
    | Improve this Doc View Source

    IsDistinctFrom<T>(T, T)

    Declaration
    [Sql.Extension(typeof(Sql.IsDistinctBuilder), ServerSideOnly = false, PreferServerSide = false)]
    public static bool IsDistinctFrom<T>(this T value, T other)
    Parameters
    Type Name Description
    T value
    T other
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    IsDistinctFrom<T>(T, T?)

    Declaration
    [Sql.Extension(typeof(Sql.IsDistinctBuilder), ServerSideOnly = false, PreferServerSide = false)]
    public static bool IsDistinctFrom<T>(this T value, T? other) where T : struct
    Parameters
    Type Name Description
    T value
    T? other
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    IsNotDistinctFrom<T>(T, T)

    Declaration
    [Sql.Extension(typeof(Sql.IsDistinctBuilder), Expression = "NOT", ServerSideOnly = false, PreferServerSide = false)]
    public static bool IsNotDistinctFrom<T>(this T value, T other)
    Parameters
    Type Name Description
    T value
    T other
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    IsNotDistinctFrom<T>(T, T?)

    Declaration
    [Sql.Extension(typeof(Sql.IsDistinctBuilder), Expression = "NOT", ServerSideOnly = false, PreferServerSide = false)]
    public static bool IsNotDistinctFrom<T>(this T value, T? other) where T : struct
    Parameters
    Type Name Description
    T value
    T? other
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Left(string?, int?)

    Declaration
    [Sql.Function(PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SQLite", "LeftStr", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "leftUTF8", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Left(string? str, int? length)
    Parameters
    Type Name Description
    string str
    int? length
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Length(byte[]?)

    Declaration
    [Sql.Function(PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Access", "Len", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Firebird", "Octet_Length", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("SqlServer", "DataLength", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("SqlCe", "DataLength", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Sybase", "DataLength", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    public static int? Length(byte[]? value)
    Parameters
    Type Name Description
    byte[] value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Length(Binary?)

    Declaration
    [Sql.Function(PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Access", "Len", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Firebird", "Octet_Length", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("SqlServer", "DataLength", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("SqlCe", "DataLength", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Sybase", "DataLength", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    public static int? Length(Binary? value)
    Parameters
    Type Name Description
    Binary value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Length(string?)

    Declaration
    [Sql.Function(PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Access", "Len", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Firebird", "Char_Length", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("SqlServer", "Len", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("SqlCe", "Len", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Sybase", "Len", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("MySql", "Char_Length", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("Informix", "CHAR_LENGTH", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("ClickHouse", "CHAR_LENGTH", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("DB2.LUW", "CHARACTER_LENGTH({0},CODEUNITS32)", PreferServerSide = true, IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    public static int? Length(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Like(string?, string?, char?)

    Declaration
    [Sql.Function(ServerSideOnly = true, IsPredicate = true)]
    public static bool Like(string? matchExpression, string? pattern, char? escapeCharacter)
    Parameters
    Type Name Description
    string matchExpression
    string pattern
    char? escapeCharacter
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Like(string?, string?)

    Declaration
    [Sql.Function(ServerSideOnly = true, IsPredicate = true)]
    public static bool Like(string? matchExpression, string? pattern)
    Parameters
    Type Name Description
    string matchExpression
    string pattern
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Log(decimal?, decimal?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "Log({1}) / Log({0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable, Precedence = 80)]
    public static decimal? Log(decimal? newBase, decimal? value)
    Parameters
    Type Name Description
    decimal? newBase
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Log(decimal?)

    Declaration
    [Sql.Function("Informix", "LogN", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Oracle", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Firebird", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("PostgreSQL", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Log(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Log(double?, double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "Log({1}) / Log({0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable, Precedence = 80)]
    public static double? Log(double? newBase, double? value)
    Parameters
    Type Name Description
    double? newBase
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Log(double?)

    Declaration
    [Sql.Function("Informix", "LogN", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Oracle", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Firebird", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("PostgreSQL", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SapHana", "Ln", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Log(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Log10(double?)

    Declaration
    [Sql.Function("PostgreSQL", "Log", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SapHana", "Log(10,{0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Log10(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Lower(string?)

    Declaration
    [Sql.Function("$ToLower$", ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Lower(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    string
    | Improve this Doc View Source

    MakeDateTime(int?, int?, int?, int?, int?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static DateTime? MakeDateTime(int? year, int? month, int? day, int? hour, int? minute, int? second)
    Parameters
    Type Name Description
    int? year
    int? month
    int? day
    int? hour
    int? minute
    int? second
    Returns
    Type Description
    DateTime?
    | Improve this Doc View Source

    MakeDateTime(int?, int?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static DateTime? MakeDateTime(int? year, int? month, int? day)
    Parameters
    Type Name Description
    int? year
    int? month
    int? day
    Returns
    Type Description
    DateTime?
    | Improve this Doc View Source

    NewGuid()

    Declaration
    [Sql.Function("ClickHouse", "generateUUIDv4", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    [Sql.Function("Oracle", "Sys_Guid", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    [Sql.Function("Firebird", "Gen_Uuid", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    [Sql.Function("MySql", "Uuid", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    [Sql.Expression("Sybase", "NewID(1)", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    [Sql.Expression("SapHana", "SYSUUID", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    [Sql.Function("NewID", ServerSideOnly = true, CanBeNull = false, IsPure = false)]
    public static Guid NewGuid()
    Returns
    Type Description
    Guid
    | Improve this Doc View Source

    NoConvert<T>(T)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.NoConvertBuilder), ServerSideOnly = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static T NoConvert<T>(T expr)
    Parameters
    Type Name Description
    T expr
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    NotBetween<T>(T, T, T)

    Declaration
    [Sql.Extension("", "", PreferServerSide = true, IsPredicate = true, BuilderType = typeof(Sql.NotBetweenBuilder))]
    public static bool NotBetween<T>(this T value, T low, T high) where T : IComparable
    Parameters
    Type Name Description
    T value
    T low
    T high
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    NotBetween<T>(T?, T?, T?)

    Declaration
    [Sql.Extension("", "", PreferServerSide = true, IsPredicate = true, BuilderType = typeof(Sql.NotBetweenBuilder))]
    public static bool NotBetween<T>(this T? value, T? low, T? high) where T : struct, IComparable
    Parameters
    Type Name Description
    T? value
    T? low
    T? high
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    NullIf<T>(T?, T?)

    Declaration
    [Sql.Expression("NULLIF({0}, {1})", PreferServerSide = true)]
    [Sql.Expression("Access", "case when {0} = {1} then null else {0} end", PreferServerSide = false)]
    [Sql.Expression("SqlCe", "case when {0} = {1} then null else {0} end", PreferServerSide = false)]
    public static T? NullIf<T>(T? value, T? compareTo) where T : class
    Parameters
    Type Name Description
    T value
    T compareTo
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    NullIf<T>(T?, T)

    Declaration
    [Sql.Expression("NULLIF({0}, {1})", PreferServerSide = true)]
    [Sql.Expression("Access", "case when {0} = {1} then null else {0} end", PreferServerSide = false)]
    [Sql.Expression("SqlCe", "case when {0} = {1} then null else {0} end", PreferServerSide = false)]
    public static T? NullIf<T>(T? value, T compareTo) where T : struct
    Parameters
    Type Name Description
    T? value
    T compareTo
    Returns
    Type Description
    T?
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    NullIf<T>(T?, T?)

    Declaration
    [Sql.Expression("NULLIF({0}, {1})", PreferServerSide = true)]
    [Sql.Expression("Access", "case when {0} = {1} then null else {0} end", PreferServerSide = false)]
    [Sql.Expression("SqlCe", "case when {0} = {1} then null else {0} end", PreferServerSide = false)]
    public static T? NullIf<T>(T? value, T? compareTo) where T : struct
    Parameters
    Type Name Description
    T? value
    T? compareTo
    Returns
    Type Description
    T?
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Overlaps<T1, T2, T3, T4>(SqlRow<T1, T2>, SqlRow<T3, T4>)

    Declaration
    [Sql.Extension("", "", IsPredicate = true, ServerSideOnly = true, Precedence = 50, BuilderType = typeof(Sql.OverlapsBuilder))]
    public static bool Overlaps<T1, T2, T3, T4>(this Sql.SqlRow<T1, T2> thisRow, Sql.SqlRow<T3, T4> other)
    Parameters
    Type Name Description
    Sql.SqlRow<T1, T2> thisRow
    Sql.SqlRow<T3, T4> other
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4
    | Improve this Doc View Source

    PadLeft(string?, int?, char?)

    Declaration
    [Sql.Function(Name = "LPad", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "leftPadUTF8({0}, toUInt32({1}), {2})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? PadLeft(string? str, int? length, char? paddingChar)
    Parameters
    Type Name Description
    string str
    int? length
    char? paddingChar
    Returns
    Type Description
    string
    | Improve this Doc View Source

    PadRight(string?, int?, char?)

    Declaration
    [Sql.Function(Name = "RPad", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "rightPadUTF8({0}, toUInt32({1}), {2})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? PadRight(string? str, int? length, char? paddingChar)
    Parameters
    Type Name Description
    string str
    int? length
    char? paddingChar
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Power(double?, double?)

    Declaration
    [Sql.Expression("Access", "{0} ^ {1}", Precedence = 80, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Power(double? x, double? y)
    Parameters
    Type Name Description
    double? x
    double? y
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Property<T>(object?, string)

    Allows access to entity property via name. Property can be dynamic or non-dynamic.

    Declaration
    public static T Property<T>(object? entity, string propertyName)
    Parameters
    Type Name Description
    object entity

    The entity.

    string propertyName

    Name of the property.

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Property type.

    Exceptions
    Type Condition
    LinqException

    'Property' is only server-side method.

    | Improve this Doc View Source

    Replace(string?, char?, char?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Sybase", "Str_Replace", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "replaceAll", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Replace(string? str, char? oldValue, char? newValue)
    Parameters
    Type Name Description
    string str
    char? oldValue
    char? newValue
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Replace(string?, string?, string?)

    Declaration
    [Sql.Function("$Replace$", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Replace(string? str, string? oldValue, string? newValue)
    Parameters
    Type Name Description
    string str
    string oldValue
    string newValue
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Reverse(string?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "reverseUTF8", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Reverse(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Right(string?, int?)

    Declaration
    [Sql.Function(PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SQLite", "RightStr", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "rightUTF8", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Right(string? str, int? length)
    Parameters
    Type Name Description
    string str
    int? length
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Round(decimal?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Round(decimal? value, int? precision)
    Parameters
    Type Name Description
    decimal? value
    int? precision
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Round(decimal?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Round(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Round(double?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Round(double? value, int? precision)
    Parameters
    Type Name Description
    double? value
    int? precision
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Round(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Round(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RoundToEven(decimal?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "roundBankers", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? RoundToEven(decimal? value, int? precision)
    Parameters
    Type Name Description
    decimal? value
    int? precision
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    RoundToEven(decimal?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("ClickHouse", "roundBankers", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    public static decimal? RoundToEven(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    RoundToEven(double?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "roundBankers", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? RoundToEven(double? value, int? precision)
    Parameters
    Type Name Description
    double? value
    int? precision
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RoundToEven(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Function("ClickHouse", "roundBankers", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    public static double? RoundToEven(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Row<T1, T2>(T1, T2)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, T2> Row<T1, T2>(T1 value1, T2 value2)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    Returns
    Type Description
    Sql.SqlRow<T1, T2>
    Type Parameters
    Name Description
    T1
    T2
    | Improve this Doc View Source

    Row<T1, T2, T3>(T1, T2, T3)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, Sql.SqlRow<T2, T3>> Row<T1, T2, T3>(T1 value1, T2 value2, T3 value3)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    T3 value3
    Returns
    Type Description
    Sql.SqlRow<T1, Sql.SqlRow<T2, T3>>
    Type Parameters
    Name Description
    T1
    T2
    T3
    | Improve this Doc View Source

    Row<T1, T2, T3, T4>(T1, T2, T3, T4)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, T4>>> Row<T1, T2, T3, T4>(T1 value1, T2 value2, T3 value3, T4 value4)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    T3 value3
    T4 value4
    Returns
    Type Description
    Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, T4>>>
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4
    | Improve this Doc View Source

    Row<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, T5>>>> Row<T1, T2, T3, T4, T5>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    T3 value3
    T4 value4
    T5 value5
    Returns
    Type Description
    Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, T5>>>>
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4
    T5
    | Improve this Doc View Source

    Row<T1, T2, T3, T4, T5, T6>(T1, T2, T3, T4, T5, T6)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, Sql.SqlRow<T5, T6>>>>> Row<T1, T2, T3, T4, T5, T6>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    T3 value3
    T4 value4
    T5 value5
    T6 value6
    Returns
    Type Description
    Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, Sql.SqlRow<T5, T6>>>>>
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4
    T5
    T6
    | Improve this Doc View Source

    Row<T1, T2, T3, T4, T5, T6, T7>(T1, T2, T3, T4, T5, T6, T7)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, Sql.SqlRow<T5, Sql.SqlRow<T6, T7>>>>>> Row<T1, T2, T3, T4, T5, T6, T7>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    T3 value3
    T4 value4
    T5 value5
    T6 value6
    T7 value7
    Returns
    Type Description
    Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, Sql.SqlRow<T5, Sql.SqlRow<T6, T7>>>>>>
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4
    T5
    T6
    T7
    | Improve this Doc View Source

    Row<T1, T2, T3, T4, T5, T6, T7, T8>(T1, T2, T3, T4, T5, T6, T7, T8)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.RowBuilder), ServerSideOnly = true)]
    public static Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, Sql.SqlRow<T5, Sql.SqlRow<T6, Sql.SqlRow<T7, T8>>>>>>> Row<T1, T2, T3, T4, T5, T6, T7, T8>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8)
    Parameters
    Type Name Description
    T1 value1
    T2 value2
    T3 value3
    T4 value4
    T5 value5
    T6 value6
    T7 value7
    T8 value8
    Returns
    Type Description
    Sql.SqlRow<T1, Sql.SqlRow<T2, Sql.SqlRow<T3, Sql.SqlRow<T4, Sql.SqlRow<T5, Sql.SqlRow<T6, Sql.SqlRow<T7, T8>>>>>>>
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4
    T5
    T6
    T7
    T8
    | Improve this Doc View Source

    Sign(decimal?)

    Declaration
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sign(double?)

    Declaration
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sign(short?)

    Declaration
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(short? value)
    Parameters
    Type Name Description
    short? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sign(int?)

    Declaration
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(int? value)
    Parameters
    Type Name Description
    int? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sign(long?)

    Declaration
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(long? value)
    Parameters
    Type Name Description
    long? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sign(sbyte?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(sbyte? value)
    Parameters
    Type Name Description
    sbyte? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sign(float?)

    Declaration
    [Sql.Function("Access", "Sgn", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static int? Sign(float? value)
    Parameters
    Type Name Description
    float? value
    Returns
    Type Description
    int?
    | Improve this Doc View Source

    Sin(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Sin(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Sinh(double?)

    Declaration
    [Sql.Function("ClickHouse", "sinh", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Sinh(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Space(int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SapHana", "Lpad('',{0},' ')", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "leftPadUTF8('', toUInt32({0}), ' ')", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Space(int? length)
    Parameters
    Type Name Description
    int? length
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Sqrt(double?)

    Declaration
    [Sql.Function("Access", "Sqr", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Sqrt(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    StringAggregate(IEnumerable<string?>, string)

    Declaration
    [Sql.Extension("SqlServer.2022", "STRING_AGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2019", "STRING_AGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2017", "STRING_AGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("PostgreSQL", "STRING_AGG({source}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("SapHana", "STRING_AGG({source}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSapHanaBuilder))]
    [Sql.Extension("SQLite", "GROUP_CONCAT({source}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("MySql", "GROUP_CONCAT({source}{_}{order_by_clause?} SEPARATOR {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle", "LISTAGG({source}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle.Native", "LISTAGG({source}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2", "LISTAGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.LUW", "LISTAGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.z/OS", "LISTAGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Firebird", "LIST({source}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("ClickHouse", "arrayStringConcat(groupArray({source}), {separator})", IsAggregate = true, ChainPrecedence = 10, CanBeNull = false)]
    public static Sql.IAggregateFunctionNotOrdered<string?, string> StringAggregate(this IEnumerable<string?> source, string separator)
    Parameters
    Type Name Description
    IEnumerable<string> source
    string separator
    Returns
    Type Description
    Sql.IAggregateFunctionNotOrdered<string, string>
    | Improve this Doc View Source

    StringAggregate(IQueryable<string?>, string)

    Declaration
    [Sql.Extension("SqlServer.2022", "STRING_AGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2019", "STRING_AGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2017", "STRING_AGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("PostgreSQL", "STRING_AGG({source}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("SapHana", "STRING_AGG({source}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSapHanaBuilder))]
    [Sql.Extension("SQLite", "GROUP_CONCAT({source}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("MySql", "GROUP_CONCAT({source}{_}{order_by_clause?} SEPARATOR {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle", "LISTAGG({source}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle.Native", "LISTAGG({source}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2", "LISTAGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.LUW", "LISTAGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.z/OS", "LISTAGG({source}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Firebird", "LIST({source}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("ClickHouse", "arrayStringConcat(groupArray({source}), {separator})", IsAggregate = true, ChainPrecedence = 10, CanBeNull = false)]
    public static Sql.IAggregateFunctionNotOrdered<string?, string> StringAggregate(this IQueryable<string?> source, string separator)
    Parameters
    Type Name Description
    IQueryable<string> source
    string separator
    Returns
    Type Description
    Sql.IAggregateFunctionNotOrdered<string, string>
    | Improve this Doc View Source

    StringAggregate<T>(IEnumerable<T>, string, Func<T, string?>)

    Declaration
    [Sql.Extension("SqlServer.2022", "STRING_AGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2019", "STRING_AGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2017", "STRING_AGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("PostgreSQL", "STRING_AGG({selector}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("SapHana", "STRING_AGG({selector}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSapHanaBuilder))]
    [Sql.Extension("SQLite", "GROUP_CONCAT({selector}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("MySql", "GROUP_CONCAT({selector}{_}{order_by_clause?} SEPARATOR {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle", "LISTAGG({selector}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle.Native", "LISTAGG({selector}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2", "LISTAGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.LUW", "LISTAGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.z/OS", "LISTAGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Firebird", "LIST({selector}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("ClickHouse", "arrayStringConcat(groupArray({selector}), {separator})", IsAggregate = true, ChainPrecedence = 10, CanBeNull = false)]
    public static Sql.IAggregateFunctionNotOrdered<T, string> StringAggregate<T>(this IEnumerable<T> source, string separator, Func<T, string?> selector)
    Parameters
    Type Name Description
    IEnumerable<T> source
    string separator
    Func<T, string> selector
    Returns
    Type Description
    Sql.IAggregateFunctionNotOrdered<T, string>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    StringAggregate<T>(IQueryable<T>, string, Expression<Func<T, string?>>)

    Declaration
    [Sql.Extension("SqlServer.2022", "STRING_AGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2019", "STRING_AGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("SqlServer.2017", "STRING_AGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSql2017Builder))]
    [Sql.Extension("PostgreSQL", "STRING_AGG({selector}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("SapHana", "STRING_AGG({selector}, {separator}{_}{order_by_clause?})", IsAggregate = true, ChainPrecedence = 10, BuilderType = typeof(Sql.StringAggSapHanaBuilder))]
    [Sql.Extension("SQLite", "GROUP_CONCAT({selector}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("MySql", "GROUP_CONCAT({selector}{_}{order_by_clause?} SEPARATOR {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle", "LISTAGG({selector}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Oracle.Native", "LISTAGG({selector}, {separator}) {aggregation_ordering}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2", "LISTAGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.LUW", "LISTAGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("DB2.z/OS", "LISTAGG({selector}, {separator}){_}{aggregation_ordering?}", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("Firebird", "LIST({selector}, {separator})", IsAggregate = true, ChainPrecedence = 10)]
    [Sql.Extension("ClickHouse", "arrayStringConcat(groupArray({selector}), {separator})", IsAggregate = true, ChainPrecedence = 10, CanBeNull = false)]
    public static Sql.IAggregateFunctionNotOrdered<T, string> StringAggregate<T>(this IQueryable<T> source, string separator, Expression<Func<T, string?>> selector)
    Parameters
    Type Name Description
    IQueryable<T> source
    string separator
    Expression<Func<T, string>> selector
    Returns
    Type Description
    Sql.IAggregateFunctionNotOrdered<T, string>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Stuff(IEnumerable<string>, int?, int?, string)

    Declaration
    [Sql.Function(ServerSideOnly = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "concat(substringUTF8({0}, 1, {1} - 1), {3}, substringUTF8({0}, {1} + {2}))", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string Stuff(IEnumerable<string> characterExpression, int? start, int? length, string replaceWithExpression)
    Parameters
    Type Name Description
    IEnumerable<string> characterExpression
    int? start
    int? length
    string replaceWithExpression
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Stuff(string?, int?, int?, string?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "concat(substringUTF8({0}, 1, {1} - 1), {3}, substringUTF8({0}, {1} + {2}))", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Stuff(string? str, int? start, int? length, string? newString)
    Parameters
    Type Name Description
    string str
    int? start
    int? length
    string newString
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Substring(string?, int?, int?)

    Declaration
    [Sql.Function(PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Access", "Mid", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("DB2", "Substr", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Informix", "Substr", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("Oracle", "Substr", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("SQLite", "Substr", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Firebird", "Substring({0} from {1} for {2})", PreferServerSide = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Substring(string? str, int? start, int? length)
    Parameters
    Type Name Description
    string str
    int? start
    int? length
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TableAlias(string)

    Declaration
    public static Sql.SqlID TableAlias(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    Sql.SqlID
    | Improve this Doc View Source

    TableExpr(object, TableQualification)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilder), ServerSideOnly = true)]
    public static ISqlExpression TableExpr(object tableExpr, Sql.TableQualification qualification)
    Parameters
    Type Name Description
    object tableExpr
    Sql.TableQualification qualification
    Returns
    Type Description
    ISqlExpression
    | Improve this Doc View Source

    TableExpr(object)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilder), ServerSideOnly = true)]
    public static ISqlExpression TableExpr(object tableExpr)
    Parameters
    Type Name Description
    object tableExpr
    Returns
    Type Description
    ISqlExpression
    | Improve this Doc View Source

    TableExpr<T>(ITable<T>, TableQualification)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilderDirect))]
    public static ISqlExpression TableExpr<T>(ITable<T> table, Sql.TableQualification qualification) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Sql.TableQualification qualification
    Returns
    Type Description
    ISqlExpression
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TableExpr<T>(ITable<T>)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilderDirect))]
    public static ISqlExpression TableExpr<T>(ITable<T> table) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Returns
    Type Description
    ISqlExpression
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TableField<TEntity, TColumn>(TEntity, string)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableFieldBuilder))]
    public static TColumn TableField<TEntity, TColumn>(TEntity entity, string fieldName)
    Parameters
    Type Name Description
    TEntity entity
    string fieldName
    Returns
    Type Description
    TColumn
    Type Parameters
    Name Description
    TEntity
    TColumn
    | Improve this Doc View Source

    TableName(object, TableQualification)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilder), ServerSideOnly = true)]
    public static string TableName(object tableExpr, Sql.TableQualification qualification)
    Parameters
    Type Name Description
    object tableExpr
    Sql.TableQualification qualification
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TableName(object)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilder), ServerSideOnly = true)]
    public static string TableName(object tableExpr)
    Parameters
    Type Name Description
    object tableExpr
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TableName(string)

    Declaration
    public static Sql.SqlID TableName(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    Sql.SqlID
    | Improve this Doc View Source

    TableName<T>(ITable<T>, TableQualification)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilderDirect))]
    public static string TableName<T>(ITable<T> table, Sql.TableQualification qualification) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Sql.TableQualification qualification
    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TableName<T>(ITable<T>)

    Declaration
    [Sql.Extension("", BuilderType = typeof(Sql.TableNameBuilderDirect))]
    public static string TableName<T>(ITable<T> table) where T : notnull
    Parameters
    Type Name Description
    ITable<T> table
    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TableSpec(string)

    Declaration
    public static Sql.SqlID TableSpec(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    Sql.SqlID
    | Improve this Doc View Source

    Tan(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Tan(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    Tanh(double?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Tanh(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    ToDate(int?, int?, int?, int?, int?, int?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static DateTime? ToDate(int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond)
    Parameters
    Type Name Description
    int? year
    int? month
    int? day
    int? hour
    int? minute
    int? second
    int? millisecond
    Returns
    Type Description
    DateTime?
    | Improve this Doc View Source

    ToDate(int?, int?, int?, int?, int?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static DateTime? ToDate(int? year, int? month, int? day, int? hour, int? minute, int? second)
    Parameters
    Type Name Description
    int? year
    int? month
    int? day
    int? hour
    int? minute
    int? second
    Returns
    Type Description
    DateTime?
    | Improve this Doc View Source

    ToDate(int?, int?, int?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static DateTime? ToDate(int? year, int? month, int? day)
    Parameters
    Type Name Description
    int? year
    int? month
    int? day
    Returns
    Type Description
    DateTime?
    | Improve this Doc View Source

    ToNotNull<T>(T?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static T ToNotNull<T>(T? value) where T : struct
    Parameters
    Type Name Description
    T? value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    ToNotNullable<T>(T?)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static T ToNotNullable<T>(T? value) where T : struct
    Parameters
    Type Name Description
    T? value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    ToNullable<T>(T)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static T? ToNullable<T>(T value) where T : struct
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    T?
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    ToSql<T>(T)

    Declaration
    [CLSCompliant(false)]
    [Sql.Expression("{0}", new int[] { 0 }, ServerSideOnly = true, InlineParameters = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static T ToSql<T>(T obj)
    Parameters
    Type Name Description
    T obj
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Trim(string?, char?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("DB2", "Strip({0}, B, {1})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("ClickHouse", "trim(BOTH {1} FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Trim(string? str, char? ch)
    Parameters
    Type Name Description
    string str
    char? ch
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Trim(string?)

    Declaration
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Trim(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TrimLeft(string?, char?)

    Declaration
    [Sql.Expression("ClickHouse", "trim(LEADING {1} FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Firebird", "TRIM(LEADING {1} FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("DB2", "Strip({0}, L, {1})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("LTrim", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? TrimLeft(string? str, char? ch)
    Parameters
    Type Name Description
    string str
    char? ch
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TrimLeft(string?)

    Declaration
    [Sql.Expression("Firebird", "TRIM(LEADING FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("LTrim", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "trimLeft", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? TrimLeft(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TrimRight(string?, char?)

    Declaration
    [Sql.Expression("ClickHouse", "trim(TRAILING {1} FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Firebird", "TRIM(TRAILING {1} FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("DB2", "Strip({0}, T, {1})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("RTrim", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? TrimRight(string? str, char? ch)
    Parameters
    Type Name Description
    string str
    char? ch
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TrimRight(string?)

    Declaration
    [Sql.Expression("Firebird", "TRIM(TRAILING FROM {0})", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("RTrim", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function("ClickHouse", "trimRight", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? TrimRight(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    string
    | Improve this Doc View Source

    Truncate(decimal?)

    Declaration
    [Sql.Expression("SqlServer", "Round({0}, 0, 1)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("DB2", "Truncate({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Informix", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Oracle", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Firebird", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("PostgreSQL", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("MySql", "Truncate({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SqlCe", "Round({0}, 0, 1)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SapHana", "Round({0}, 0, ROUND_DOWN)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static decimal? Truncate(decimal? value)
    Parameters
    Type Name Description
    decimal? value
    Returns
    Type Description
    decimal?
    | Improve this Doc View Source

    Truncate(double?)

    Declaration
    [Sql.Expression("SqlServer", "Round({0}, 0, 1)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("DB2", "Truncate({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Informix", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Oracle", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("Firebird", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("PostgreSQL", "Trunc({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("MySql", "Truncate({0}, 0)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SqlCe", "Round({0}, 0, 1)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Expression("SapHana", "Round({0}, 0, ROUND_DOWN)", IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    [Sql.Function(IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static double? Truncate(double? value)
    Parameters
    Type Name Description
    double? value
    Returns
    Type Description
    double?
    | Improve this Doc View Source

    TryConvert<TFrom, TTo>(TFrom, TTo?)

    Performs value conversion to specified type. If conversion failed, returns null. Supported databases:

    • SQL Server 2012 or newer
    • Oracle 12.2 or newer (not all conversions possible, check Oracle's documentation on CAST expression)
    Declaration
    [CLSCompliant(false)]
    [Sql.Function("$TryConvert$", new int[] { 3, 2, 0 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.Nullable)]
    public static TTo? TryConvert<TFrom, TTo>(TFrom value, TTo? _) where TTo : class
    Parameters
    Type Name Description
    TFrom value

    Value to convert.

    TTo _

    Unused. Added to support method overloads.

    Returns
    Type Description
    TTo

    Value, converted to target type or null if conversion failed.

    Type Parameters
    Name Description
    TFrom

    Source value type.

    TTo

    Target value type.

    | Improve this Doc View Source

    TryConvert<TFrom, TTo>(TFrom, TTo?)

    Performs value conversion to specified type. If conversion failed, returns null. Supported databases:

    • SQL Server 2012 or newer
    • Oracle 12.2 or newer (not all conversions possible, check Oracle's documentation on CAST expression)
    Declaration
    [CLSCompliant(false)]
    [Sql.Function("$TryConvert$", new int[] { 3, 2, 0 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.Nullable)]
    public static TTo? TryConvert<TFrom, TTo>(TFrom value, TTo? _) where TTo : struct
    Parameters
    Type Name Description
    TFrom value

    Value to convert.

    TTo? _

    Unused. Added to support method overloads.

    Returns
    Type Description
    TTo?

    Value, converted to target type or null if conversion failed.

    Type Parameters
    Name Description
    TFrom

    Source value type.

    TTo

    Target value type.

    | Improve this Doc View Source

    TryConvertOrDefault<TFrom, TTo>(TFrom, TTo?)

    Performs value conversion to specified type. If conversion failed, returns value, specified by defaultValue parameter. Supported databases:

    • Oracle 12.2 or newer (not all conversions possible, check Oracle's documentation on CAST expression)
    Declaration
    [CLSCompliant(false)]
    [Sql.Function("$TryConvertOrDefault$", new int[] { 3, 2, 0, 1 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static TTo? TryConvertOrDefault<TFrom, TTo>(TFrom value, TTo? defaultValue) where TTo : class
    Parameters
    Type Name Description
    TFrom value

    Value to convert.

    TTo defaultValue

    Value, returned when conversion failed.

    Returns
    Type Description
    TTo

    Value, converted to target type or defaultValue if conversion failed.

    Type Parameters
    Name Description
    TFrom

    Source value type.

    TTo

    Target value type.

    | Improve this Doc View Source

    TryConvertOrDefault<TFrom, TTo>(TFrom, TTo?)

    Performs value conversion to specified type. If conversion failed, returns value, specified by defaultValue parameter. Supported databases:

    • Oracle 12.2 or newer (not all conversions possible, check Oracle's documentation on CAST expression)
    Declaration
    [CLSCompliant(false)]
    [Sql.Function("$TryConvertOrDefault$", new int[] { 3, 2, 0, 1 }, ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static TTo? TryConvertOrDefault<TFrom, TTo>(TFrom value, TTo? defaultValue) where TTo : struct
    Parameters
    Type Name Description
    TFrom value

    Value to convert.

    TTo? defaultValue

    Value, returned when conversion failed.

    Returns
    Type Description
    TTo?

    Value, converted to target type or defaultValue if conversion failed.

    Type Parameters
    Name Description
    TFrom

    Source value type.

    TTo

    Target value type.

    | Improve this Doc View Source

    Upper(string?)

    Declaration
    [Sql.Function("$ToUpper$", ServerSideOnly = true, IsPure = true, IsNullable = Sql.IsNullableType.IfAnyParameterNullable)]
    public static string? Upper(string? str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    string
    | Improve this Doc View Source

    ZeroPad(int?, int)

    Declaration
    [Sql.Expression("Lpad({0},{1},'0')", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("Access", "Format({0}, String('0', {1}))", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("Sybase", "right(replicate('0',{1}) + cast({0} as varchar(255)),{1})", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("PostgreSQL", "Lpad({0}::text,{1},'0')", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("SqlServer", "format({0}, 'd{1}')", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("SQLite", "printf('%0{1}d', {0})", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("ClickHouse", "leftPadUTF8(toString({0}), toUInt32({1}), '0')", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    [Sql.Expression("SqlCe", "REPLICATE('0', {1} - LEN(CAST({0} as NVARCHAR({1})))) + CAST({0} as NVARCHAR({1}))", IsNullable = Sql.IsNullableType.SameAsFirstParameter)]
    public static string? ZeroPad(int? val, int length)
    Parameters
    Type Name Description
    int? val
    int length
    Returns
    Type Description
    string
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2011-2023 linq2db.com

    Generated by DocFX