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 = 4DecimalAsString = 6Encodes 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 = 0No encoding. The value is projected directly to double.
TimeOnlyTicks = 5UnixMilliseconds = 1Encodes DateTimeOffset as Unix milliseconds since the epoch.
UnixSeconds = 2Encodes DateTimeOffset as Unix seconds since the epoch.
UtcTicks = 3Encodes 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.