Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :as modifier to projections #192

Open
quoll opened this issue Jul 7, 2021 · 0 comments
Open

Add :as modifier to projections #192

quoll opened this issue Jul 7, 2021 · 0 comments
Assignees

Comments

@quoll
Copy link
Contributor

quoll commented Jul 7, 2021

Depends on #191 being complete.

Standard projected results are a seq of vectors, with the seq having metadata describing the column names for all of the vectors. These columns are named according the the variables that they are bound to, or for aggregate columns, a combination of the aggregate term and the variable it is evaluated on.

The :as keyword can be used after any element in the :find expression to rename the column.

Note: The :find expression may also contain constants. Check if these are correctly appearing in the cols array. For instance:

[:find ?x :data ?y :where ...]

Should return a seq with metadata of {:cols [?x :data ?y]}

Similarly:

[:find ?x :data :as ?z ?y :where ...]

Should return a seq with metadata of {:cols [?x ?z ?y]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants