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

Parameters #122

Merged
merged 2 commits into from
Jun 26, 2023
Merged

Parameters #122

merged 2 commits into from
Jun 26, 2023

Conversation

divarvel
Copy link
Contributor

@divarvel divarvel commented May 16, 2023

Parsed datalog snippets can now contain placeholders (for instance: check if right({resource}, {operation}). This allows embedding dynamic values in datalog, without the risk of injections.

All the FromString* methods now have a FromString*WithParams counterpart that take an extra
map[string]Term value.

/!\ For now, it is the caller's responsibility to make sure the all the placeholders in expressions have a corresponding value defined (same as making sure sets don't contain variables).
Placeholders set in predicates don't have this issue. This is an underlying issue of the parser; it was not introduced by this change.

Parsed datalog snippets can now contain placeholders (for instance: `check if right({resource}, {operation}`). This allows embedding dynamic values in datalog, without the risk of injections.

All the `FromString*` methods now have a `FromString*WithParams` counterpart that take an extra
`map[string]Term` value.

/!\ For now, it is the caller's responsibility to make sure the all the placeholders **in expressions** have a corresponding value defined (same as making sure sets don't contain variables).
Placeholders set in predicates don't have this issue. This is an underlying issue of the parser; it was not introduced by this change.
Base automatically changed from parser-fixes to main June 26, 2023 08:07
@divarvel divarvel marked this pull request as ready for review June 26, 2023 08:08
@divarvel divarvel merged commit 5e888ee into main Jun 26, 2023
3 checks passed
@divarvel divarvel deleted the parameters branch June 26, 2023 08:33
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

Successfully merging this pull request may close these issues.

1 participant