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

Named variables support #37

Merged
merged 2 commits into from
Dec 4, 2020
Merged

Named variables support #37

merged 2 commits into from
Dec 4, 2020

Conversation

daeMOn63
Copy link
Contributor

this switches biscuit.Variable type from uint32 to string, allowing more readable variables. (ie: $0 can be replaced by $username).

The variable names are stored in the global symbols table, and their internal value (on datalog side is set to the integer index from the symbol table. for example, given a symbol table containing ["a", "b"], defining a fact containing a new variable $c will insert the "c" string in the table (so it contains ["a", "b", "c"]) and set its internal value to 2 (so symbols2] = "c").

Tests have been fixed, and samples updated from the specification repository (modified by biscuit-auth/biscuit@828f4c3)

this replaces integer variables by strings, allowing more readable
definitions. (ie: $0 become $username).
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.

None yet

2 participants