Skip to content

VQL functions/stored queries can now define default values#124

Merged
scudette merged 1 commit intomasterfrom
default_args
Mar 7, 2026
Merged

VQL functions/stored queries can now define default values#124
scudette merged 1 commit intomasterfrom
default_args

Conversation

@scudette
Copy link
Contributor

@scudette scudette commented Mar 7, 2026

Default values for parameters allow VQL functions to be more flexible:

LET F(X=2, Y=3) = X + Y
SELECT F(), F(Y=3), F(X=1) FROM scope()

Required parameters do not have a default. The verifier will flag missing args.

LET F(X, Y=2) = X + Y
SELECT F(X=3) FROM scope()

Default values for parameters allow VQL functions to be more flexible:

```
LET F(X=2, Y=3) = X + Y
SELECT F(), F(Y=3), F(X=1) FROM scope()
```

Required parameters do not have a default. The verifier will flag
missing args.
```
LET F(X, Y=2) = X + Y
SELECT F(X=3) FROM scope()
```
@scudette scudette merged commit 36fc6ee into master Mar 7, 2026
5 checks passed
@scudette scudette deleted the default_args branch March 7, 2026 07:43
@scudette scudette restored the default_args branch March 7, 2026 07:46
@scudette scudette deleted the default_args branch March 7, 2026 07:47
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