Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

cue: add unary constraints #11

Closed
mpvl opened this issue Jan 31, 2019 · 2 comments
Closed

cue: add unary constraints #11

mpvl opened this issue Jan 31, 2019 · 2 comments
Labels
FeatureRequest New feature or request Proposal

Comments

@mpvl
Copy link
Contributor

mpvl commented Jan 31, 2019

For instance:

a: >5         // This field must be greater than 5
b: !=null     // This field must not be null

c: >3.0 & <10  // (3.0, 10.0) open ended range on both sides

Supported operators:

< > >= <= != ==

These would be defined on the same types as their binary equivalents. Semantically such expressions would define disjunctions of possible values, analogous to ranges.

Introducing these would solve various limitations that are currently present. Such as defining open ended ranges for floats or requiring that a value should not be of a specific type.

@mpvl mpvl added FeatureRequest New feature or request Proposal labels Jan 31, 2019
@mpvl
Copy link
Contributor Author

mpvl commented Feb 9, 2019

Implemented. Ranges are removed.

@cueckoo
Copy link

cueckoo commented Jul 3, 2021

This issue has been migrated to cue-lang/cue#11.

For more details about CUE's migration to a new home, please see cue-lang/cue#1078.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest New feature or request Proposal
Projects
None yet
Development

No branches or pull requests

2 participants