Class TemporalDecoder

Assembly: redb.Core.dll

Optional, provider-registered decoder for the case where a numeric database value
targets a temporal CLR type (//
). This only arises when a backend stores datetimes as a number —
e.g. SQLite, which stores them as a REAL Julian-day. Object reads go through that backend's
own JSON projection (which already emits ISO text), but analytics paths (Min/Max,
AggregateRedbAsync, Window, GroupBy) select the raw column and return the bare number.
Core stays storage-agnostic: it knows nothing about Julian days or any epoch — it merely
asks the registered decoder. The decoder is null by default, so providers that never return
a number for a temporal column (PostgreSQL, SQL Server) are completely unaffected. The
numeric backend (redb.SQLite) registers the decoder when it is configured.

public static class TemporalDecoder

Inheritance

Object→TemporalDecoder

Methods

ChangeType(object, Type)

that first lets a numeric value

public static object ChangeType(object value, Type targetType)

IsTemporal(Type)

True for the temporal target types this decoder handles.

public static bool IsTemporal(Type t)

TryDecode(object?, Type, out object?)

If a decoder is registered, value is numeric, and

public static bool TryDecode(object? value, Type targetType, out object? result)