Documentation
Table of Contents

Class CompiledMapping

Namespace
IntentSharp.Mapping
Assembly
IntentSharp.dll

One revision of a compiled mapping: the steps a model compiled once for a key (the input and output shapes, the intent and the declarations), which then run in process on every input with that key. A store keeps one row per namespace, key and revision. No input value is held anywhere in the row.

public sealed class CompiledMapping
Inheritance
object
CompiledMapping
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

CompiledMapping()

Creates a row; set the required members.

Properties

CompiledBy

How the revision was compiled. Compile-time provenance, never the source of a reused answer.

ExecutorVersion

The version of the step vocabulary the row was written under; a row with another version is refused, never run.

HashFormat

The version of the key's hashing the row was written under; a row with another version is refused, never run.

IntentName

The catalog intent's name, when the mapping was declared in an intent file; otherwise null.

IntentText

The intent the mapping was compiled from, trimmed.

IntentVersion

The catalog intent's version, when the mapping was declared in an intent file; otherwise null.

Key

The mapping key: a hash prefix, a colon, and 64 lowercase hex digits.

Kind

What the mapping maps between.

Namespace

The store namespace the row belongs to; nothing is shared across namespaces.

Profile

What was measured of the samples the steps were compiled and proved on, read on every reuse to notice drift; null when the compile was not recorded (DoNotRecord). For each parse step's source and each number a step reads: the number of values and nulls, the range and median of the number magnitudes (the power of ten of the leading digit; zeros counted apart) and how many values each declared format read. Measurements, never values.

RetiredAt

When the revision was retired; null while it is active or pending.

RetiredReason

Why the revision was retired; null while it is active or pending.

Revision

The revision, counted from 1 per namespace and key. A store assigns it when it writes the row.

SourceShape

The canonical description of the input shape that was hashed into the key.

Status

Whether the revision runs. A store assigns it when it writes the row.

Steps

The steps, in the order they run.

TargetShape

The canonical description of the output shape that was hashed into the key.

Unproven

The output members whose source the samples did not prove.

Methods

Parse(string)

Reads a row written by ToJson(), such as one a store of your own kept. Throws MappingFormatException naming the problem when the text is not JSON, a required member is missing or null, a step names an op or an argument this library does not know, or a member has the wrong type. Loading does not check that the steps fit the shapes; a store's row is checked again before it runs.

ToJson()

Returns the row as JSON, in the form Parse(string) reads, with SerializerOptions.