Versions in this module Expand all Collapse all v0 v0.2.1 Feb 9, 2024 Changes in this version + const REPR_UNIQUENESS_IDENT + const REPR_UNIQUENESS_NAME + const TRANSIENT_ID_UNIQUENESS_IDENT + const TRANSIENT_ID_UNIQUENESS_NAME + const URL_UNIQUENESS_IDENT + const URL_UNIQUENESS_NAME + var EXPECTED_SYMB_VALUE_FOR_UNIQUENESS = fmt.Sprintf("#%s, #%s, #%s or a property name is expected", URL_UNIQUENESS_IDENT, ...) + var ErrCannotAddURLToElemOfOtherContainer = errors.New("cannot add a URL to the element of an other container") + var ErrContainerShouldHaveURL = errors.New("container should have a URL") + var ErrFailedGetUniqueKeyNoProps = errors.New("failed to get unique key for value since it has no properties") + var ErrFailedGetUniqueKeyNoURL = errors.New("failed to get unique key for value since it has no URL") + var ErrFailedGetUniqueKeyPropMissing = errors.New("failed to get unique key for value since the property is missing") + var ErrPropertyBasedUniquenessRequireValuesToHaveTheProperty = errors.New("property-based uniqueness requires values to have the property") + var ErrReprBasedUniquenessRequireValuesToBeImmutable = errors.New("representation-based uniqueness requires values to be immutable") + var ErrTransientIDBasedUniquenessRequireValuesToHaveTransientID = errors.New("transient id-based uniqueness requires values to have a transient id") + var ErrUrlBasedUniquenessRequireValuesToBeUrlHolders = errors.New("URL-based uniqueness requires values to be URL holders") + var REPR_UNIQUENESS_SYMB_IDENT = symbolic.NewIdentifier(REPR_UNIQUENESS_IDENT.UnderlyingString()) + var TRANSIENT_ID_UNIQUENESS_SYMB_IDENT = symbolic.NewIdentifier(TRANSIENT_ID_UNIQUENESS_IDENT.UnderlyingString()) + var URL_UNIQUENESS_SYMB_IDENT = symbolic.NewIdentifier(URL_UNIQUENESS_IDENT.UnderlyingString()) + var UniqueKeyReprConfig = &core.ReprConfig + func GetElementPathKeyFromKey(key string, uniqueness UniquenessConstraintType) core.ElementKey + func GetUniqueKey(ctx *core.Context, args KeyRetrievalParams) string + type CollectionIterator struct + HasNext_ func(*CollectionIterator, *core.Context) bool + Key_ func(*CollectionIterator, *core.Context) core.Value + Next_ func(*CollectionIterator, *core.Context) bool + Value_ func(*CollectionIterator, *core.Context) core.Value + func NewEmptyCollectionIterator() *CollectionIterator + func (it *CollectionIterator) Equal(ctx *core.Context, other core.Value, alreadyCompared map[uintptr]uintptr, ...) bool + func (it *CollectionIterator) HasNext(ctx *core.Context) bool + func (it *CollectionIterator) IsMutable() bool + func (it *CollectionIterator) Iterator(ctx *core.Context, config core.IteratorConfiguration) core.Iterator + func (it *CollectionIterator) Key(ctx *core.Context) core.Value + func (it *CollectionIterator) Next(ctx *core.Context) bool + func (it *CollectionIterator) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, ...) + func (it *CollectionIterator) ToSymbolicValue(ctx *core.Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error) + func (it *CollectionIterator) Value(ctx *core.Context) core.Value + type KeyRetrievalParams struct + Config UniquenessConstraint + Container core.Value + JSONSerializationConfig core.JSONSerializationConfig + Stream *jsoniter.Stream + Value core.Serializable + type UniquenessConstraint struct + PropertyName core.PropertyName + Type UniquenessConstraintType + func DeserializeNextUniquenessConstraintFromJSON(it *jsoniter.Iterator) (UniquenessConstraint, error) + func NewPropertyValueUniqueness(name string) *UniquenessConstraint + func NewReprUniqueness() *UniquenessConstraint + func NewTransientIdUniqueness() *UniquenessConstraint + func NewURLUniqueness() *UniquenessConstraint + func UniquenessConstraintFromSymbolicValue(val symbolic.Value, elementPattern symbolic.Pattern) (UniquenessConstraint, error) + func UniquenessConstraintFromValue(val core.Value) (UniquenessConstraint, bool) + func (c UniquenessConstraint) AddUrlIfNecessary(ctx *core.Context, container core.UrlHolder, element core.Value) + func (c UniquenessConstraint) Equal(otherConstraint UniquenessConstraint) bool + func (c UniquenessConstraint) ToSymbolicValue() symbolic.Value + func (c UniquenessConstraint) ToValue() core.Serializable + func (c UniquenessConstraint) WriteJSONRepresentation(w *jsoniter.Stream) + type UniquenessConstraintType int + const UniquePropertyValue + const UniqueRepr + const UniqueTransientID + const UniqueURL