Section navigation

Public enum LeanNumericEncoding

Namespace
Rowles.LeanCorpus.Mapping
Assembly
Rowles.LeanCorpus.dll

Selects the runtime encoding used to map a CLR value into a NumericField double payload.

public enum LeanNumericEncoding

Fields

DateOnlyDayNumber = 4

Encodes DateOnly as DayNumber.

DecimalAsString = 6

Encodes decimal losslessly as an invariant-culture string in a stored-only field rather than a numeric field. Sorting and range queries are not supported.

None = 0

No encoding. The value is projected directly to double.

TimeOnlyTicks = 5

Encodes TimeOnly as Ticks.

UnixMilliseconds = 1

Encodes DateTimeOffset as Unix milliseconds since the epoch.

UnixSeconds = 2

Encodes DateTimeOffset as Unix seconds since the epoch.

UtcTicks = 3

Encodes DateTimeOffset as UTC tick count.

Remarks

Generated mappers require an explicit encoding for any type where the default double projection would be lossy or surprising, such as DateTimeOffset, DateOnly, TimeOnly, and decimal.