Skip to content

Constraints: how to query for patterns in workspace field paths? #3515

Answered by awmottaz
awmottaz asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I think I see now. The FieldPath in the workspace_field query predicate needs to be instantiated.

My gen_enforced_field rule is invalid because Field is not bound to fields in each workspace and narrowed by the atom_concat and sub_atom predicates like I assumed, but instead this is attempting to instantiate it to "all strings starting with 'scripts.' and including a colon" which is an infinite list (triggering the error).

Similarly, the query I ran failed because I didn't have enough arguments.

And finally, my poor approximation of testing these rules was incorrect because constraints does not actually create facts for the existing workspace fields, which would have made the fields al…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by awmottaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant