https://github.com/iteralabs/magnetise
A Rust library to asses the similarity between SQL queries.
https://github.com/iteralabs/magnetise
Last synced: 8 months ago
JSON representation
A Rust library to asses the similarity between SQL queries.
- Host: GitHub
- URL: https://github.com/iteralabs/magnetise
- Owner: IteraLabs
- License: gpl-3.0
- Created: 2024-08-31T04:23:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-04T19:57:30.000Z (over 1 year ago)
- Last Synced: 2025-04-23T18:40:53.210Z (11 months ago)
- Language: Rust
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# magnetise
Welcome to **magnetise**, a Rust library to asses the similarity between SQL queries.
## Usage
```rust
fn main() {
// Short length queries are cases with
// higher sensibility towards small differences.
let query1 = "SELECT * FROM users WHERE age > 30";
let query2 = "SELECT * FROM users WHERE age > 31";
let similarity = jaccard_similarity(query1, query2);
println!("Jaccard similarity: {}", similarity);
}
```