Skip to main content

RtCkIdExtensions

Namespace: Meshmakers.Octo.ConstructionKit.Contracts

Extensions for RtCkId<TElementId> covering storage-identifier conversions.

public static class RtCkIdExtensions

Inheritance Object → RtCkIdExtensions

Methods​

ToStorageIdentifier<TKey>(RtCkId<TKey>)​

Returns the RtCkId<TElementId>.SemanticVersionedFullName with all non-alphanumeric characters stripped. Suitable as a database identifier (collection name, table name, schema name).

public static string ToStorageIdentifier<TKey>(RtCkId<TKey> ckKey)

Type Parameters​

TKey

Parameters​

ckKey RtCkId<TKey>

Returns​

String

ToStorageIdentifier<TKey>(RtCkId<TKey>, Int32)​

Same as RtCkIdExtensions.ToStorageIdentifier<TKey>(RtCkId<TKey>) but caps the result at maxLength characters. When the cleaned name exceeds the limit it is truncated and a deterministic 16-character SHA-256 prefix of the original cleaned name is appended (form: {truncated}_{hash16}) so different sources do not collide after truncation. CrateDB identifiers are limited to 255 bytes; pass 63 for schema names and 200 for table names per the StreamData archive concept §4.

public static string ToStorageIdentifier<TKey>(RtCkId<TKey> ckKey, int maxLength)

Type Parameters​

TKey

Parameters​

ckKey RtCkId<TKey>

maxLength Int32

Returns​

String