DatabaseUtil

Description

static class Tinman.Core.Database.DatabaseUtil

Helper class for this namespace.

Public / Constants

Block​Index​Format​Bool


public static readonly attribute BlockIndexFormatBool → (IBlockIndexFormat<bool>)

Default IBlockIndexFormat implementation for boolean values.

Block​Index​Format​Float32


public static readonly attribute BlockIndexFormatFloat32 → (IBlockIndexFormat<float32>)

Default IBlockIndexFormat implementation for 32-bit floating point values.

Block​Index​Format​Float64


public static readonly attribute BlockIndexFormatFloat64 → (IBlockIndexFormat<float64>)

Default IBlockIndexFormat implementation for 64-bit floating point values values.

Block​Index​Format​Int16


public static readonly attribute BlockIndexFormatInt16 → (IBlockIndexFormat<int16>)

Default IBlockIndexFormat implementation for 16-bit integer values values.

Block​Index​Format​Int32


public static readonly attribute BlockIndexFormatInt32 → (IBlockIndexFormat<int32>)

Default IBlockIndexFormat implementation for 32-bit integer values values.

Block​Index​Format​Int64


public static readonly attribute BlockIndexFormatInt64 → (IBlockIndexFormat<int64>)

Default IBlockIndexFormat implementation for 64-bit integer values values.

Block​Index​Format​Int8


public static readonly attribute BlockIndexFormatInt8 → (IBlockIndexFormat<int8>)

Default IBlockIndexFormat implementation for 8-bit integer values values.

Invalid​Id


public constant InvalidId → (-1:int64)

Special block ID value for invalid resp. non-existent blocks.

Valid block IDs are greater than or equal to 0.

Public / Attributes

Cache​Memory


public static attribute CacheMemory → (get,set)

value : int32

[>=0]
The amount of cache memory, in megabytes. If 0, the default value will be used.

Amount of memory to use for caching nodes of BlockStorage and BlockIndex objects.

The node cache is global, i.e. all BlockStorage and BlockIndex objects share it.

The default value is 32 <= N/64 <= 512, where N is the amount of total memory (see LowLevel.MemoryTotal), in megabytes.

Cache​Object


[OwnerReturn]
public static attribute CacheObject → (get)

value : IDisposable

[not-null]
The cache object.

Returns the cache object.

The cache object is created when needed and disposed when no longer needed. By keeping the returned cache object alive, client code can avoid repeated creations / disposals if only one entity at a time is using the cache.