Interface ITypeMetadataCache
Specialized cache for data types.
Fast access to type metadata by ID and name.
Types change very rarely, so this cache can live long.
public interface ITypeMetadataCache
Methods
GetAllCachedTypes()
Get all cached types (for diagnostics).
Dictionary<long, RedbType> GetAllCachedTypes()
GetAllTypesAsync()
Get all data types (often used during initialization).
Task<List<RedbType>> GetAllTypesAsync()
GetAllTypesMapAsync()
Get all types map ID -> type (optimization for bulk operations).
Task<Dictionary<long, RedbType>> GetAllTypesMapAsync()
GetTypeByNameAsync(string)
Get type by name (String, Long, DateTime, etc.).
Task<RedbType?> GetTypeByNameAsync(string typeName)
GetTypeIdByNameAsync(string)
Get type ID by name (fast access to frequently used info).
Task<long?> GetTypeIdByNameAsync(string typeName)
GetTypesByNameMapAsync()
Get all types map name -> type (optimization for name lookup).
Task<Dictionary<string, RedbType>> GetTypesByNameMapAsync()
SetAllTypes(List<RedbType>)
Add or update all types in cache (usually during initialization).
void SetAllTypes(List<RedbType> types)
TypeSupportsArraysAsync(long)
Check if type supports arrays.
Task<bool> TypeSupportsArraysAsync(long typeId)