Namespace Rinku.Mapping
Classes
- AbortOnNullAndNotNullHandle
The null rule that collapses the owning object when a column is
NULL, otherwise throws.
- AbortOnNullAndNullableHandle
The null rule that collapses the owning object when a column is
NULL, otherwise a default.
- AbortOnNullAttribute
Collapses the owning object to nothing when this column is
NULL, so a nested object that is all nulls becomes absent instead of an instance of blanks.
- AltAttribute
Adds another name a column may go by when matching this parameter, property, or field. Put it where the column name differs from the member name, or apply it more than once for several alternatives.
- AltSkippingSegmentsAttribute
Adds an alternative name that also consumes a set number of name segments, for reaching a member nested that many levels down when a column name is flattened.
- AltUpToAttribute
Adds an alternative name that consumes segments up to a given key, for reaching a member across a flattened name whose depth is named rather than counted.
- AlwaysGroupedBoundary
Places every row in one group.
- AreReadableAttribute
Allows unregistered types used by a construction path to be registered on demand. On a type, this applies to its immediate construction parameters and writable members. It does not register the attributed type itself.
- ArrayContentComparer<T>
Compares arrays by their contents rather than by reference, so two arrays with equal elements are equal.
- BaseTypeInfo
Maps a scalar to the first unused compatible column and applies the standard conversions.
- BoxConverter
Boxes a value type into an object/interface reference.
- CanCompleteWithMembersAttribute
Specifies that an instantiation method allows for additional property or field assignments after the initial object creation.
- CanLookAnywhereAttribute
The member may look anywhere in the schema to find its column, not only the one following the last consumed. On a complex-typed slot this frees only the subtree's first claimed column. The rest keep the inherited regime. Use CanLookAnywhereSubtreeAttribute to free the whole subtree.
- CanLookAnywhereSubtreeAttribute
The subtree form of CanLookAnywhereAttribute. It allows the whole nested value to look anywhere, not just its first column.
- CanNotLookAnywhereAttribute
The member must not look anywhere and must take only the column following the last consumed. On a complex-typed slot this constrains only the subtree's first claimed column. The rest keep the inherited regime. Use CanNotLookAnywhereSubtreeAttribute to constrain the whole subtree.
- CanNotLookAnywhereSubtreeAttribute
The subtree form of CanNotLookAnywhereAttribute. It requires the whole nested value to use subtree to sequential reading, not just its first column.
- CastClassConverter
Casts a reference to the target class or interface.
- ConstructorConverter
Calls a constructor that accepts the source type as its single argument.
- CtorTypeInfo
Maps constructor parameters by column order and type instead of by name.
- DbConstructorAttribute
Marks the constructor used by CtorTypeInfo.
- DbItemPlan
Describes how part of a result is read. Return a plan from TryGetParser(Type, RecursiveInfo, ParamInfo, ColumnInfo[], ColModifier, ref ColumnUsage, AdditionalFlags) when adding custom type mapping.
- DefaultEmitter
Produces the type's default value, the parser used for a member that has no matching column.
- DefaultValueFallback
Uses the type default when no result column matches a member.
- DynaObject
A row read without a type to map to, its columns reachable by name or index. Ask for a
DynaObjectwhen the shape is not known ahead of time, it reads like a dictionary of the result's columns and serializes to JSON as one. Values keep their column types, read them with Get<T>(string).
- DynaObjectConverter
Serializes a DynaObject to JSON as a plain object of its columns. Reading back from JSON is not supported.
- EqualityBoundary
A key of one or more components, each read from its column with reuse and compared by its own equality. The group changes when any component changes.
- EqualityGroupingRule
Groups rows by one or more members, construction parameters, or named columns. Each key part uses equality and may still be read by the mapped object.
- ExactTypeAttribute
Requires the database column type to equal the parameter or member type.
- FlagUpdater
Applies column order and reuse settings to one slot or its complete nested value.
- GroupKeyAttribute
Marks a grouping value. Several declarations form a combined key. Construction keys are tried before type keys. A rule that returns no boundary allows the next option.
- GroupKeyColumnsAttribute
Groups a spanning type by named columns directly, no member required. The boundary reads each named column as whatever type it carries, so nothing is stored for the key. This type-level rule applies to every construction. Implement IGroupingRuleMaker when named columns are not enough.
- GroupKeyMethodAttribute
Sets the static method that decides grouping for one constructor or factory. The method receives the stored key followed by values from the current row. It returns whether the group stays open and the next key.
- GroupKeyNegotiation
Builds readers used by custom grouping rules.
- GroupingBoundary
Decides when rows belong to the same object in a spanning mapping. Derive from this type for a grouping rule that cannot use equality or a boundary method.
- Helper
Provides extensions for ColumnInfo
- IdentityConverter
Leaves a value unchanged when the source and target types are compatible.
- JoinedNameComparer
Joins two comparers, prioritizing the AltComparer branch.
- KeepNullElementsAttribute
Keeps a null element in a collection instead of dropping it. A reference or nullable element becomes null and another value type becomes its default value.
- KeepNullElementsHandle
The null rule for collection elements marked with [KeepNullElements], keeps the element as the type's default.
- MayReuseColAttribute
Specifies that a column may be read without consuming it, whether or not an earlier slot consumed it. On a complex-typed slot this applies to the subtree's first claimed column. Use MayReuseColSubtreeAttribute for the whole subtree.
- MayReuseColSubtreeAttribute
The subtree form of MayReuseColAttribute. It lets every column used by the nested value subtree reusable and non-consuming, not just its first claim.
- MemberParser
A validated mapping between a class member (Property, Field, or Method) and a database column matcher.
- MethodBoundary
Uses a static method to decide whether the current row stays in the group. The method receives the stored key followed by values from the current row. It returns whether the group stays open and the key to store for the next row.
- MethodCallConverter
Converts a value through an implicit or explicit conversion method.
- MethodCtorInfo
A validated candidate for object instantiation, wrapping a A validated candidate for object instantiation, wrapping a ConstructorInfo or static MethodInfo.
- MethodGroupingRule
A boundary decided by a marked
static (bool, TKey) Method(TKey stored, ...params). The stored key is the first parameter. every parameter after it is negotiated like an ordinary reader, so the method's inputs carry alternates and nesting.
- MultiRowTypeParsingInfo
Registers a type that adds values from several rows into one result. Supply how to create the working value, how to add one element, and how to create the final result. Use ForList for lists and ForArray for arrays.
- NameComparer
Matches if the current segment ends with Name (Span 1).
- NameComparerGroup
Matches by evaluating children from right to left.
- NameComparerHelper
Provides common operations for changing name comparers.
- NameMultiSpan
Matches if the current segment ends with Name and bypasses Span preceding comparers.
- NameMultiSpanKey
Matches if the current segment ends with Name and bypasses preceding comparers up to a comparer with UpToKey.
- NoNameAttribute
Drops a member's own name from matching, so it matches only through its columns or alternatives rather than by its identifier. Used for a nested value that has no name of its own in the result.
- NoNameComparer
Matches when no name is provided (identity match).
- NotNullHandle
The null rule that throws when a column is
NULL, the default for a non-nullable value.
- NullValueAssignmentException
Thrown when a database
NULLis assigned to a value that does not accept null.
- NullableTypeHandle
The null rule that substitutes the type's default when a column is
NULL.
- NullableWrapperConverter
Wraps an existing value into Nullable<T>.
- OpCodeConverter
Converts a value with the supplied conversion operation.
- ParamInfo
Describes how one constructor parameter, property, or field matches and reads a column. Change its name and null rules when the defaults do not match the database.
- ParamInfoPlus
A member read plan that also carries a reading-order tweak and a fallback for when no column matches, the plan the reading-order and default attributes assemble.
- ParsableConverter
Converts text through IParsable<TSelf> or a static
Parsemethod.
- ParserDisposingEventArgs
Describes a parser that has left its originating cache and is about to be disposed.
- ScalarDbItemPlan
Base plan for a value read from one column. Derive from this type to define how a database value is read after the standard null and order checks.
- ScalarDbItemPlan<T>
A typed ScalarDbItemPlan that reads
T.
- ScalarTypeParsingInfo
A base registration for values read from one result column. Derive from this type to add a scalar mapping while keeping the standard name, order, reuse, and fallback rules.
- ScalarTypeParsingInfo<T>
A typed base registration for values read from one result column. A value type registration also accepts its nullable form.
- SimpleDbItemParser
Base plan for a value that can be read from the current row. Derive from this type when a custom plan can provide its own read instructions.
- StringToEnumConverter
Converts text to an enum by name or number. Name matching ignores case.
- ToStringConverter
Converts a value to text and uses FormatProvider when supported.
- TypeParser
Builds the parser that reads a result into a given
T. Cached parsers decide which schemas they can accept. When none can, the makers in TypeParserMakers are tried in order and the first to claimTbuilds one. Add a maker to that list to register a custom result type.
- TypeParserMakerCollection
The ordered parser-maker registrations.
- TypeParsingInfo
Controls how one type is created from result columns. Register or change one to choose construction paths, members, names, null rules, and grouping. An open generic registration applies when no exact registration exists.
- TypeParsingInfoHelper
Provides methods to change names, null rules, construction paths, members, and grouping.
- UsePrivateMembersAttribute
Allows default mapping to discover non-public construction paths and writable members.
Structs
- ColModifier
Holds the name and column usage settings for the current nested value.
- ColumnInfo
One column of a result, its name, CLR type, and whether it may be null. The unit a mapping matches members against.
- ColumnUsage
Tracks which result columns a mapping plan has claimed.
- NullSetPoint
Marks where a custom read plan continues after a database
NULLcollapses a value.
- RecursiveInfo
Records the column usage and parent type at an earlier mapping point.
Interfaces
- IBoundaryBuild
Creates the readers and fields needed by a custom grouping rule.
- IBoundaryField
Stores one part of a grouping key between rows.
- IBoundaryReader
Reads one part of a grouping key from the current row.
- ICanAddMember
A type mapping that lets a post-construction member be added by hand.
- ICanAddPossibleConstructor
A type mapping that lets a construction path be added by hand.
- ICanProvideConstructions
Exposes the whole set of construction paths for reading and wholesale replacement, so callers can reorder or rebuild it without reaching for a concrete info type. Assigning validates every entry.
- ICanProvideMembers
Exposes the whole set of post-construction members for reading and wholesale replacement, the member counterpart to ICanProvideConstructions. Assigning validates every entry.
- ICanProvideParamInfos
A type mapping that can list its slots.
- ICanUpdateAltNames
A type mapping that lets its column-name matching be reshaped.
- ICanUpdateGroupKey
A type mapping whose group boundary can be read and replaced.
- ICanUpdateNullColHandlers
Allows a type mapping to change the null rules for its slots.
- IColModifier
Adjusts how a member claims its columns, its reading order and reuse, per slot or across a subtree.
- IColumnOrdinalPlan
Exposes the single database column read by a plan.
- ICompositeDbItemPlan
Describes a composite plan that constructs a value from parameter and member plans.
- IDbReadable
Marks a type as one Rinku can read, so it is picked up and registered automatically without a manual call.
- IFallbackParserGetter
Supplies a parser for a member when no column matches it, such as one that produces a default value.
- IGroupingRule
Creates the group boundary for a spanning mapping. Implement this interface when the built in group key attributes cannot express the required rule.
- IGroupingRuleMaker
Lets an attribute provide a custom grouping rule. Implement this interface on an attribute used by types, members, or construction parameters.
- IMultiRowPlan
Describes a plan that adds one element from each row to an accumulated result. Implement this interface for a custom multi row plan.
- IMultiRowTypeParsingInfo
Marks a type mapping that may read more than one row for one value.
- IMutatableNameComparer
Lets a name comparer add and remove names or other comparers.
- INameComparer
Decides whether a column name matches a member or parameter. Implement this interface for a naming rule that cannot be expressed with the built in naming attributes.
- INameComparerMaker
Creates the name comparer supplied by an attribute on a member or parameter.
- INameComparerThatCanAdd
Lets a name comparer add one alternative name.
- INameComparerThatCanAddAComparer
Lets a name comparer add another comparer.
- INameComparerThatCanRemove
Lets a name comparer remove one name.
- INameComparerThatCanRemoveAComparer
Lets a name comparer remove another comparer.
- INullColHandler
What a
NULLcolumn means for a value, take a default, throw, or collapse the object it belongs to. This is the column-level counterpart to the null-accepting result shapes.
- INullColHandlerMaker
Creates the null rule supplied by an attribute on a member or parameter.
- IParamInfoMaker
Provides the rules for reading one member or parameter. Implement this interface to replace the mapping of selected members or parameters.
- ISimpleDbItemPlan
Marks a plan that can read its value from the current row.
- ITypeConverter
Converts a column's value from the type the reader gives to the type a member wants, a cast, a parse, a constructor, an implicit operator. This is how a mapping bridges the gap when the two types differ.
- ITypeParserMaker
Creates parsers for custom result types. Add a maker to TypeParserMakers before the default makers.
- ITypeParserSchemaMatcher
Tests whether a parser produced by a maker can serve another schema. The parser cache knows only this capability. the maker remains responsible for deciding what makes two generated parsers equivalent.
- IUsageFlagModifier
Applies a custom column reading order rule to a member or parameter.
Enums
- MethodCtorInfo.AdditionalFlags
Flags for a mci instance
- ParserInvalidationMode
Controls how caches retaining a parser respond while that parser is being invalidated.
- UsageFlags
Controls column order and reuse while a type is mapped.
Delegates
- NameComparerFactory
Creates the name comparer used by one member or parameter.