Table of Contents

Enum NullsDefaultOrdering

Namespace
LinqToDB.Internal.SqlQuery
Assembly
linq2db.dll

Describes how a provider places NULL values in an ORDER BY by default (i.e. when no NULLS FIRST/NULLS LAST is specified). Used to elide a requested Sql.NullsPosition when it already matches the provider's natural placement for the item's sort direction.

public enum NullsDefaultOrdering
Extension Methods

Fields

AlwaysFirst = 3

NULL always sorts first, regardless of sort direction.

AlwaysLast = 4

NULL always sorts last, regardless of sort direction (e.g. ClickHouse).

Largest = 2

NULL sorts as the largest value: ascending ⇒ NULLS LAST, descending ⇒ NULLS FIRST (e.g. Oracle, PostgreSQL, DB2).

Smallest = 1

NULL sorts as the smallest value: ascending ⇒ NULLS FIRST, descending ⇒ NULLS LAST (e.g. SQL Server, MySQL, SQLite, Firebird 2.0+).

Unknown = 0

The natural placement is unknown — a requested Sql.NullsPosition is always honored and never elided.