Crates.io | webql |
lib.rs | webql |
version | 0.1.0 |
source | src |
created_at | 2022-10-28 06:48:22.44595 |
updated_at | 2022-10-28 06:48:22.44595 |
description | WebQL is a library that allows to get data from multiple resources or JSON and filter the result |
homepage | https://github.com/rusty-ferris-club/webql |
repository | https://github.com/rusty-ferris-club/webql |
max_upload_size | |
id | 700161 |
size | 111,582 |
WebQL is a library that allows to get data from multiple resources or JSON and filter the result.
[dependencies]
webql = { version = "0.1.0" }
github
feature flag for filter pull request data.use serde_json::json;
let json = json!({
"url": "https://github.com/rusty-ferris-club/webql",
"body": "some example",
"labels": [
{
"name": "label-1",
},
{
"name": "label-2",
},
],
"user" : {
"login": "kaplanelad"
}
});
let filters = vec![
Filter {
query: r#""user"."login""#.to_string(),
operation: Operation::Equal,
values: vec!["kaplanelad".to_string()],
},
Filter {
query: r#""labels"|={"name"}."name""#.to_string(),
operation: Operation::Equal,
values: vec!["label-1".to_string()],
},
Filter {
query: r#""body""#.to_string(),
operation: Operation::Contains,
values: vec!["example".to_string()],
},
];
jfilter::is_match_filters(&json, &filters)
To all Contributors - you make this happen, thanks!
Copyright (c) 2022 @kaplanelad. See LICENSE for further details.