Path: redb/redb.Export/Flat/Model/FlatModelEnums.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Export/Flat/Model/FlatModelEnums.cs ---- namespace redb.Export.Flat.Model; /// What a flat table holds. public enum FlatTableKind { /// The shared header table (objects). Objects, /// The flat copy of _lists. Lists, /// The flat copy of _list_items. ListItems, /// Props of one scheme; one row per object, keyed by the object id. Scheme, /// A nested class outside a collection; one-to-one with its owner row. NestedClass, /// Elements of an array or a dictionary; many rows per owner row. Collection } /// Kind of the collection a table stores. public enum FlatCollectionKind { /// Not a collection table. None, /// Array, List<T> and the other shapes scheme sync treats as an array. Array, /// Dictionary<TKey, TValue> or IDictionary<TKey, TValue>. Dictionary } /// What one element of a collection is. public enum FlatElementKind { /// Not a collection table. None, /// A scalar stored in the _value column. Scalar, /// A class; its properties are the columns of the collection table. Class, /// A RedbObject<T>; _value holds the target object id. ObjectReference, /// A RedbListItem; _value holds the list item id. ListItemReference } /// How a dictionary key is laid out in the flat table. public enum FlatKeyKind { /// Not a dictionary table. None, /// A simple key in one typed _key column. Simple, /// A ValueTuple of simple components, one _key_ItemN column per component. Tuple, /// Any other key; one text _key column with the JSON the key is stored as. Json } /// The part a column plays in its table. public enum FlatColumnRole { /// Primary key: the object id in a scheme table, the _values._id of the row elsewhere. PrimaryKey, /// Reference to the owner row. Owner, /// Position of an array element, read from _array_index. ArrayIndex, /// Dictionary key or one component of it, read from _array_index. DictionaryKey, /// A column of a service table, copied from the redb column of the same name. Header, /// A scalar Props value. Scalar, /// The id of the object a RedbObject<T> points to. ObjectReference, /// The id of the list item a RedbListItem points to. ListItemReference } /// The _values column a payload value is read from. public enum FlatValueSource { /// Not read from a typed _values column. None, /// _String. String, /// _Long. Long, /// _Guid. Guid, /// _Double. Double, /// _DateTimeOffset. DateTimeOffset, /// _Boolean. Boolean, /// _ByteArray. ByteArray, /// _Numeric. Numeric, /// _ListItem. ListItem, /// _Object. Object } /// /// Delete rule of a flat foreign key. The rules mirror redb's own schema: what redb removes together /// with an object, the flat database removes together with its row. /// public enum FlatDeleteRule { /// The referenced row cannot be deleted while it is referenced: references between objects. NoAction, /// /// Deleted together with the referenced row: the Props of an object, the elements of a collection, /// the fields of a nested class, the children in a tree, the items of a list. /// Cascade, /// Kept, with the reference cleared: a list item that points to a deleted object. SetNull }