Interface ITypeMetadataCache

Assembly: redb.Core.dll

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()

GetNetTypeAsync(long)

Get .NET type for REDB type.

Task<Type?> GetNetTypeAsync(long typeId)

GetStatistics()

Get type cache statistics.

TypeCacheStatistics GetStatistics()

GetTypeByIdAsync(long)

Get type by ID.

Task<RedbType?> GetTypeByIdAsync(long typeId)

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()

InvalidateAll()

Clear all type cache (rare operation).

void InvalidateAll()

InvalidateType(long)

Remove type from cache by ID.

void InvalidateType(long typeId)

InvalidateType(string)

Remove type from cache by name.

void InvalidateType(string typeName)

SetAllTypes(List<RedbType>)

Add or update all types in cache (usually during initialization).

void SetAllTypes(List<RedbType> types)

SetType(RedbType)

Add or update type in cache.

void SetType(RedbType type)

TypeSupportsArraysAsync(long)

Check if type supports arrays.

Task<bool> TypeSupportsArraysAsync(long typeId)

TypeSupportsNullAsync(long)

Check if type is nullable.

Task<bool> TypeSupportsNullAsync(long typeId)