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

189 change protected entity pe to privacy unit pu and pep to pup #191

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
## Added
- `SUBSTR` function [MR186](https://github.com/Qrlew/qrlew/pull/186)

## [0.5.0] - 2023-11-19
### Changed
- Breaking name change: Protected Entity -> Privacy Unit + PEP -> PUP [#189](https://github.com/Qrlew/qrlew/issues/189)

## [0.4.13] - 2023-11-14
## Added
- `TRIM` function [MR183](https://github.com/Qrlew/qrlew/pull/183)
- `SUBSTR` function [MR186](https://github.com/Qrlew/qrlew/pull/186)

## [0.4.12] - 2023-11-09
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Nicolas Grislain <ng@sarus.tech>"]
name = "qrlew"
version = "0.4.13"
version = "0.5.0"
edition = "2021"
description = "Sarus Qrlew Engine"
documentation = "https://docs.rs/qrlew"
Expand All @@ -19,7 +19,7 @@ rand = "0.8"
log = "0.4"
env_logger = "0.10"
colored = "2.0"
itertools = "0.11"
itertools = "0.12"
paste = "1.0.7"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
Expand Down
96 changes: 0 additions & 96 deletions examples/website.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,103 +43,7 @@ fn ranges() {
println!("query = {query}");
}

// fn protect() {
// use qrlew::ast::Query;
// use qrlew::display::Dot;
// use qrlew::io::{postgresql, Database};
// use qrlew::With;
// use qrlew::{sql::parse, Relation};

// let database = postgresql::test_database();
// let relations = database.relations();
// let relation = Relation::try_from(
// parse(
// "SELECT * FROM order_table JOIN
// item_table ON id=order_id;",
// )
// .unwrap()
// .with(&relations),
// )
// .unwrap();
// println!("relation = {relation}");
// let relation: Relation = relation
// .force_protect_from_field_paths(
// &relations,
// vec![
// (
// "item_table",
// vec![
// ("order_id", "order_table", "id"),
// ("user_id", "user_table", "id"),
// ],
// "name",
// ),
// ("order_table", vec![("user_id", "user_table", "id")], "name"),
// ("user_table", vec![], "name"),
// ],
// )
// .into();
// println!("relation = {relation}");
// relation.display_dot().unwrap();
// let query = Query::from(&relation);
// println!("query = {query}");
// }

// fn compile() {
// use qrlew::ast::Query;
// use qrlew::display::Dot;
// use qrlew::io::{postgresql, Database};
// use qrlew::With;
// use qrlew::{sql::parse, Relation};

// let database = postgresql::test_database();
// let relations = database.relations();
// let relation = Relation::try_from(
// parse("SELECT sum(price) FROM item_table;")
// .unwrap()
// .with(&relations),
// )
// .unwrap();
// println!("relation = {relation}");
// let pep_relation = relation.force_protect_from_field_paths(
// &relations,
// vec![
// (
// "item_table",
// vec![
// ("order_id", "order_table", "id"),
// ("user_id", "user_table", "id"),
// ],
// "name",
// ),
// ("order_table", vec![("user_id", "user_table", "id")], "name"),
// ("user_table", vec![], "name"),
// ],
// );
// pep_relation.display_dot().unwrap();

// let epsilon = 1.;
// let delta = 1e-3;
// let epsilon_tau_thresholding = 1.;
// let delta_tau_thresholding = 1e-3;
// let (relation, _) = pep_relation
// .dp_compile(
// epsilon,
// delta,
// epsilon_tau_thresholding,
// delta_tau_thresholding,
// )
// .unwrap()
// .into();
// relation.display_dot().unwrap();
// println!("relation = {relation}");
// let query = Query::from(&relation);
// println!("query = {query}");
// }

fn main() {
// rewrite();
ranges();
// protect();
// compile();
}
Loading