Skip to content

Commit

Permalink
Merge 'Replace scalar function declaration in extension API with proc…
Browse files Browse the repository at this point in the history
… macro' from Preston Thorpe

Per @penberg's suggestion on Discord, the `declare_scalar_functions!`
declarative macro has been replaced with a procedural one, allowing for
a much nicer API.
```rust
#[export_scalar]
#[args(0)]
fn uuid4_blob(_args: &[Value]) -> Value {
    let uuid = uuid::Uuid::new_v4();
    let bytes = uuid.as_bytes();
    Value::from_blob(bytes.to_vec())
}
```

Closes #687
  • Loading branch information
penberg committed Jan 15, 2025
2 parents ca2333d + 343ccb3 commit d0b5f50
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 151 deletions.
46 changes: 26 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d0b5f50

Please sign in to comment.