Documentation
¶
Overview ¶
Code generated by copy paste; DO NOT EDIT.
Package encodingaspects is the closed vocabulary of encoding hints (ADR-0182). Every aspect maps to a real storage-encoding capability of a target technology (codec chains, native types); intensity scales (light … ultra-heavy) are advisory effort levels the technology mapping interprets. Numbering is the wire format (segments in physical column names): append-only between migration windows, family-grouped as of v2.
Index ¶
- Constants
- Variables
- func CheckFamilyExclusivity(set AspectSet) (err error)
- func ContainsAspect(encoded AspectSet, target AspectE) (has bool)
- func CountEncodedAspects(encoded AspectSet) (n int, err error)
- func IterateAspects(encoded AspectSet) iter.Seq2[int, AspectE]
- type AspectE
- type AspectSet
- func EncodeAspects(aspects ...AspectE) (encoded AspectSet, err error)
- func EncodeAspectsIgnoreInvalid(aspects ...AspectE) (encoded AspectSet)
- func EncodeAspectsMustValidate(aspects ...AspectE) (encoded AspectSet)
- func UnionAspects(asp1 AspectSet, asp2 AspectSet) (res AspectSet, err error)
- func UnionAspectsIgnoreInvalid(asp1 AspectSet, asp2 AspectSet) (res AspectSet)
- func (inst AspectSet) Contains(target AspectE) (has bool)
- func (inst AspectSet) CountEncodedAspects() (n int, err error)
- func (inst AspectSet) DecodeAspects() (known []AspectE, unknownCount int, err error)
- func (inst AspectSet) IsEmptySet() bool
- func (inst AspectSet) IsValid() bool
- func (inst AspectSet) IterateAspects() iter.Seq2[int, AspectE]
- func (inst AspectSet) MaxEncodedAspect() (aspect AspectE, err error)
- func (inst AspectSet) String() string
- func (inst AspectSet) UnionAspects(asp2 AspectSet) (res AspectSet, err error)
- func (inst AspectSet) UnionAspectsIgnoreInvalid(asp2 AspectSet) (res AspectSet)
Constants ¶
const EmptyAspectSet = AspectSet("")
const InvalidAspectEnumValueString = "<invalid AspectE>"
Variables ¶
var AllAspects = []AspectE{ AspectIntraRecordLowCardinality, AspectInterRecordLowCardinality, AspectUltraLightGeneralCompression, AspectLightGeneralCompression, AspectHeavyGeneralCompression, AspectUltraHeavyGeneralCompression, AspectDeltaEncoding, AspectDoubleDeltaEncoding, AspectUltraLightSlowlyChangingFloat, AspectLightSlowlyChangingFloat, AspectHeavySlowlyChangingFloat, AspectUltraHeavySlowlyChangingFloat, AspectLightBiasSmallInteger, AspectHeavyBiasSmallInteger, AspectSparse, AspectJsonScalar, AspectJsonArray, AspectJsonObject, AspectJson, AspectCborScalar, AspectCborArray, AspectCborMap, AspectCbor, }
var ErrEmptySet = aspectcodec.ErrEmptySet
var ErrInvalidEncoding = aspectcodec.ErrInvalidEncoding
var Families = []aspectcodec.Family[AspectE]{ {Name: "record-cardinality", Members: []AspectE{AspectIntraRecordLowCardinality, AspectInterRecordLowCardinality}, Exclusive: false}, {Name: "general-compression", Members: []AspectE{AspectUltraLightGeneralCompression, AspectLightGeneralCompression, AspectHeavyGeneralCompression, AspectUltraHeavyGeneralCompression}, Exclusive: true}, {Name: "delta-encoding", Members: []AspectE{AspectDeltaEncoding, AspectDoubleDeltaEncoding}, Exclusive: true}, {Name: "slowly-changing-float", Members: []AspectE{AspectUltraLightSlowlyChangingFloat, AspectLightSlowlyChangingFloat, AspectHeavySlowlyChangingFloat, AspectUltraHeavySlowlyChangingFloat}, Exclusive: true}, {Name: "bias-small-integer", Members: []AspectE{AspectLightBiasSmallInteger, AspectHeavyBiasSmallInteger}, Exclusive: true}, {Name: "json-native", Members: []AspectE{AspectJsonScalar, AspectJsonArray, AspectJsonObject, AspectJson}, Exclusive: false}, {Name: "cbor-native", Members: []AspectE{AspectCborScalar, AspectCborArray, AspectCborMap, AspectCbor}, Exclusive: false}, }
Families is the registry of aspect families (ADR-0182 SD3): documentation of record and the source for exclusivity validation and, later, DQL authoring diagnostics. Exclusive families admit at most one member per set.
var MaxAspectExcl = slices.Max(AllAspects) + 1
var PackageProps = packageprops.Props{ WASMWASI: packageprops.WASMCompiles, WASMJS: packageprops.WASMCompiles, WASMFreestanding: packageprops.WASMCompiles, }
PackageProps records this package's curated properties (ADR-0080). Seeded by `boxer code analysis golang wasmsurvey props generate`; curate by hand. The same group's `props verify` reconciles it.
Functions ¶
func CheckFamilyExclusivity ¶ added in v0.0.20
CheckFamilyExclusivity rejects sets carrying more than one member of an exclusive family.
func ContainsAspect ¶
func CountEncodedAspects ¶
Types ¶
type AspectE ¶
type AspectE uint8
const ( AspectIntraRecordLowCardinality AspectE = 0 AspectInterRecordLowCardinality AspectE = 1 AspectUltraLightGeneralCompression AspectE = 2 AspectLightGeneralCompression AspectE = 3 AspectHeavyGeneralCompression AspectE = 4 AspectUltraHeavyGeneralCompression AspectE = 5 AspectDeltaEncoding AspectE = 6 AspectDoubleDeltaEncoding AspectE = 7 AspectUltraLightSlowlyChangingFloat AspectE = 8 AspectLightSlowlyChangingFloat AspectE = 9 AspectHeavySlowlyChangingFloat AspectE = 10 AspectUltraHeavySlowlyChangingFloat AspectE = 11 AspectLightBiasSmallInteger AspectE = 12 AspectHeavyBiasSmallInteger AspectE = 13 AspectSparse AspectE = 14 AspectJsonScalar AspectE = 15 AspectJsonArray AspectE = 16 AspectJsonObject AspectE = 17 AspectJson AspectE = 18 AspectCborScalar AspectE = 19 AspectCborArray AspectE = 20 AspectCborMap AspectE = 21 AspectCbor AspectE = 22 )
func DecodeAspects ¶ added in v0.0.20
DecodeAspects splits a structurally valid segment into aspects known to this vocabulary and a count of unknown (too-new) indices; unknown elements never poison the known part.
func MaxEncodedAspect ¶
func SanitizeFamilyExclusivity ¶ added in v0.0.20
SanitizeFamilyExclusivity drops all but the first-encountered member of each exclusive family; sample generators use it to produce valid sets.
type AspectSet ¶
type AspectSet string
func EncodeAspects ¶
func UnionAspectsIgnoreInvalid ¶
UnionAspectsIgnoreInvalid merges both sets; a structurally invalid side is dropped rather than failing the union.