diff --git a/Cargo.toml b/Cargo.toml index add5b493..ee07cdb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.5" edition = "2021" description = "A general-purpose, transactional, relational database that uses Datalog and focuses on graph data and algorithms" authors = ["Ziyang Hu"] -license = "LGPL-3.0-or-later" +license = "MPL-2.0" homepage = "https://github.com/cozodb/cozo" repository = "https://github.com/cozodb/cozo" documentation = "https://cozodb.github.io/current/manual" diff --git a/README.md b/README.md index fa19f76e..5ce4ef1d 100644 --- a/README.md +++ b/README.md @@ -425,5 +425,5 @@ We manually wrote the C++/Rust bindings for RocksDB with [cxx](https://cxx.rs/). ## Licensing -The contents of this project are licensed under LGPL-3.0 or later, except +The contents of this project are licensed under MPL-2.0 or later, except files under `cozorocks/`, which are licensed under MIT, or Apache-2.0, or BSD-3-Clause. diff --git a/cozo-lib-c/Cargo.toml b/cozo-lib-c/Cargo.toml index 9a5d8045..fb4f0f36 100644 --- a/cozo-lib-c/Cargo.toml +++ b/cozo-lib-c/Cargo.toml @@ -2,7 +2,7 @@ name = "cozo_c" version = "0.1.3" edition = "2021" -license = "AGPL-3.0-or-later" +license = "MPL-2.0" homepage = "https://github.com/cozodb/cozo" repository = "https://github.com/cozodb/cozo" documentation = "https://cozodb.github.io/current/manual" diff --git a/cozo-lib-java/Cargo.toml b/cozo-lib-java/Cargo.toml index 7b5ff5d9..54df3dd1 100644 --- a/cozo-lib-java/Cargo.toml +++ b/cozo-lib-java/Cargo.toml @@ -2,7 +2,7 @@ name = "cozo_java" version = "0.1.3" edition = "2021" -license = "AGPL-3.0-or-later" +license = "MPL-2.0" homepage = "https://github.com/cozodb/cozo" repository = "https://github.com/cozodb/cozo" documentation = "https://cozodb.github.io/current/manual" diff --git a/src/algo/all_pairs_shortest_path.rs b/src/algo/all_pairs_shortest_path.rs index 69827ae5..8ad1aed0 100644 --- a/src/algo/all_pairs_shortest_path.rs +++ b/src/algo/all_pairs_shortest_path.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Reverse; diff --git a/src/algo/astar.rs b/src/algo/astar.rs index 5d74ac07..272fdf8a 100644 --- a/src/algo/astar.rs +++ b/src/algo/astar.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Reverse; diff --git a/src/algo/bfs.rs b/src/algo/bfs.rs index 23aa6d3b..e13ca36d 100644 --- a/src/algo/bfs.rs +++ b/src/algo/bfs.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet, VecDeque}; diff --git a/src/algo/constant.rs b/src/algo/constant.rs index c9809d2b..848b1830 100644 --- a/src/algo/constant.rs +++ b/src/algo/constant.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/csv.rs b/src/algo/csv.rs index cd96b47c..3baea0dd 100644 --- a/src/algo/csv.rs +++ b/src/algo/csv.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/degree_centrality.rs b/src/algo/degree_centrality.rs index 4458be00..775c26cb 100644 --- a/src/algo/degree_centrality.rs +++ b/src/algo/degree_centrality.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/dfs.rs b/src/algo/dfs.rs index 04541aa5..27205685 100644 --- a/src/algo/dfs.rs +++ b/src/algo/dfs.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/algo/jlines.rs b/src/algo/jlines.rs index 792453bf..e5e99455 100644 --- a/src/algo/jlines.rs +++ b/src/algo/jlines.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/kruskal.rs b/src/algo/kruskal.rs index e19b2930..f7788704 100644 --- a/src/algo/kruskal.rs +++ b/src/algo/kruskal.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Reverse; diff --git a/src/algo/label_propagation.rs b/src/algo/label_propagation.rs index b478524b..bf5083aa 100644 --- a/src/algo/label_propagation.rs +++ b/src/algo/label_propagation.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/louvain.rs b/src/algo/louvain.rs index 38be97a0..cd686153 100644 --- a/src/algo/louvain.rs +++ b/src/algo/louvain.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/algo/mod.rs b/src/algo/mod.rs index 4b14269e..c5d22b8b 100644 --- a/src/algo/mod.rs +++ b/src/algo/mod.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/pagerank.rs b/src/algo/pagerank.rs index a791a30f..597b35ff 100644 --- a/src/algo/pagerank.rs +++ b/src/algo/pagerank.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/prim.rs b/src/algo/prim.rs index d6a33cd8..8127e601 100644 --- a/src/algo/prim.rs +++ b/src/algo/prim.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Reverse; diff --git a/src/algo/random_walk.rs b/src/algo/random_walk.rs index 03aa5421..b61a6632 100644 --- a/src/algo/random_walk.rs +++ b/src/algo/random_walk.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/reorder_sort.rs b/src/algo/reorder_sort.rs index 680c4cd9..14a489a7 100644 --- a/src/algo/reorder_sort.rs +++ b/src/algo/reorder_sort.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/shortest_path_dijkstra.rs b/src/algo/shortest_path_dijkstra.rs index 39eee66a..b4abd82b 100644 --- a/src/algo/shortest_path_dijkstra.rs +++ b/src/algo/shortest_path_dijkstra.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::{Ordering, Reverse}; diff --git a/src/algo/strongly_connected_components.rs b/src/algo/strongly_connected_components.rs index 50dd5c8d..6f3b3162 100644 --- a/src/algo/strongly_connected_components.rs +++ b/src/algo/strongly_connected_components.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::min; diff --git a/src/algo/top_sort.rs b/src/algo/top_sort.rs index 5ae2d3b4..48d5a547 100644 --- a/src/algo/top_sort.rs +++ b/src/algo/top_sort.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/algo/triangles.rs b/src/algo/triangles.rs index 047c7fb9..66bbcfe5 100644 --- a/src/algo/triangles.rs +++ b/src/algo/triangles.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/algo/yen.rs b/src/algo/yen.rs index 505f6083..eb2c8379 100644 --- a/src/algo/yen.rs +++ b/src/algo/yen.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/bin/cozoserver.rs b/src/bin/cozoserver.rs index 7400596f..4b952a66 100644 --- a/src/bin/cozoserver.rs +++ b/src/bin/cozoserver.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::fmt::Debug; diff --git a/src/cozoscript.pest b/src/cozoscript.pest index 512dad40..41e177db 100644 --- a/src/cozoscript.pest +++ b/src/cozoscript.pest @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ script = _{sys_script | multi_script | query_script} diff --git a/src/data/aggr.rs b/src/data/aggr.rs index 275621cf..5977d7b4 100644 --- a/src/data/aggr.rs +++ b/src/data/aggr.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/data/expr.rs b/src/data/expr.rs index 8a94d2c9..cd65672c 100644 --- a/src/data/expr.rs +++ b/src/data/expr.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::{max, min}; diff --git a/src/data/functions.rs b/src/data/functions.rs index 07d14467..b6632560 100644 --- a/src/data/functions.rs +++ b/src/data/functions.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeSet; diff --git a/src/data/json.rs b/src/data/json.rs index 71fdb6d2..1088264b 100644 --- a/src/data/json.rs +++ b/src/data/json.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use serde_json::json; diff --git a/src/data/memcmp.rs b/src/data/memcmp.rs index 517dcc7f..7e78f081 100644 --- a/src/data/memcmp.rs +++ b/src/data/memcmp.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeSet; diff --git a/src/data/mod.rs b/src/data/mod.rs index 5d9ea6b7..2001f788 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ pub(crate) mod json; diff --git a/src/data/program.rs b/src/data/program.rs index f6bbb03d..d9e6f3d4 100644 --- a/src/data/program.rs +++ b/src/data/program.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::btree_map::Entry; diff --git a/src/data/relation.rs b/src/data/relation.rs index 57011a88..4d85d0a1 100644 --- a/src/data/relation.rs +++ b/src/data/relation.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::fmt::{Display, Formatter}; diff --git a/src/data/symb.rs b/src/data/symb.rs index a9b10472..ddd41a34 100644 --- a/src/data/symb.rs +++ b/src/data/symb.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Ordering; diff --git a/src/data/tests/aggrs.rs b/src/data/tests/aggrs.rs index 4dc84723..4e00a677 100644 --- a/src/data/tests/aggrs.rs +++ b/src/data/tests/aggrs.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use approx::AbsDiffEq; diff --git a/src/data/tests/functions.rs b/src/data/tests/functions.rs index 0754159d..cfa01bb1 100644 --- a/src/data/tests/functions.rs +++ b/src/data/tests/functions.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use approx::AbsDiffEq; @@ -121,7 +121,7 @@ fn test_is_in() { DataValue::from(1), DataValue::List(vec![DataValue::from(1), DataValue::from(2)]) ]) - .unwrap(), + .unwrap(), DataValue::Bool(true) ); assert_eq!( @@ -129,7 +129,7 @@ fn test_is_in() { DataValue::from(3), DataValue::List(vec![DataValue::from(1), DataValue::from(2)]) ]) - .unwrap(), + .unwrap(), DataValue::Bool(false) ); assert_eq!( @@ -245,7 +245,7 @@ fn test_comparators() { #[test] fn test_max_min() { - assert_eq!(op_max(&[DataValue::from(1), ]).unwrap(), DataValue::from(1)); + assert_eq!(op_max(&[DataValue::from(1),]).unwrap(), DataValue::from(1)); assert_eq!( op_max(&[ DataValue::from(1), @@ -253,7 +253,7 @@ fn test_max_min() { DataValue::from(3), DataValue::from(4) ]) - .unwrap(), + .unwrap(), DataValue::from(4) ); assert_eq!( @@ -263,7 +263,7 @@ fn test_max_min() { DataValue::from(3), DataValue::from(4) ]) - .unwrap(), + .unwrap(), DataValue::from(4) ); assert_eq!( @@ -273,12 +273,12 @@ fn test_max_min() { DataValue::from(3), DataValue::from(4.0) ]) - .unwrap(), + .unwrap(), DataValue::from(4.0) ); assert!(op_max(&[DataValue::Bool(true)]).is_err()); - assert_eq!(op_min(&[DataValue::from(1), ]).unwrap(), DataValue::from(1)); + assert_eq!(op_min(&[DataValue::from(1),]).unwrap(), DataValue::from(1)); assert_eq!( op_min(&[ DataValue::from(1), @@ -286,7 +286,7 @@ fn test_max_min() { DataValue::from(3), DataValue::from(4) ]) - .unwrap(), + .unwrap(), DataValue::from(1) ); assert_eq!( @@ -296,7 +296,7 @@ fn test_max_min() { DataValue::from(3), DataValue::from(4) ]) - .unwrap(), + .unwrap(), DataValue::from(1.0) ); assert_eq!( @@ -306,7 +306,7 @@ fn test_max_min() { DataValue::from(3), DataValue::from(4.0) ]) - .unwrap(), + .unwrap(), DataValue::from(1) ); assert!(op_max(&[DataValue::Bool(true)]).is_err()); @@ -560,7 +560,7 @@ fn test_bits() { DataValue::Bytes([0b111000].into()), DataValue::Bytes([0b010101].into()) ]) - .unwrap(), + .unwrap(), DataValue::Bytes([0b010000].into()) ); assert_eq!( @@ -568,7 +568,7 @@ fn test_bits() { DataValue::Bytes([0b111000].into()), DataValue::Bytes([0b010101].into()) ]) - .unwrap(), + .unwrap(), DataValue::Bytes([0b111101].into()) ); assert_eq!( @@ -580,7 +580,7 @@ fn test_bits() { DataValue::Bytes([0b111000].into()), DataValue::Bytes([0b010101].into()) ]) - .unwrap(), + .unwrap(), DataValue::Bytes([0b101101].into()) ); } @@ -618,7 +618,7 @@ fn test_concat() { DataValue::List(vec![DataValue::Bool(true), DataValue::Bool(false)]), DataValue::List(vec![DataValue::Bool(true)]) ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::Bool(true), DataValue::Bool(false), @@ -634,7 +634,7 @@ fn test_str_includes() { DataValue::Str("abcdef".into()), DataValue::Str("bcd".into()) ]) - .unwrap(), + .unwrap(), DataValue::Bool(true) ); assert_eq!( @@ -678,7 +678,7 @@ fn test_starts_ends_with() { DataValue::Str("abcdef".into()), DataValue::Str("abc".into()) ]) - .unwrap(), + .unwrap(), DataValue::Bool(true) ); assert_eq!( @@ -690,7 +690,7 @@ fn test_starts_ends_with() { DataValue::Str("abcdef".into()), DataValue::Str("def".into()) ]) - .unwrap(), + .unwrap(), DataValue::Bool(true) ); assert_eq!( @@ -706,7 +706,7 @@ fn test_regex() { DataValue::Str("abcdef".into()), DataValue::Regex(RegexWrapper(Regex::new("c.e").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::Bool(true) ); @@ -715,7 +715,7 @@ fn test_regex() { DataValue::Str("abcdef".into()), DataValue::Regex(RegexWrapper(Regex::new("c.ef$").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::Bool(true) ); @@ -724,7 +724,7 @@ fn test_regex() { DataValue::Str("abcdef".into()), DataValue::Regex(RegexWrapper(Regex::new("c.e$").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::Bool(false) ); @@ -734,7 +734,7 @@ fn test_regex() { DataValue::Regex(RegexWrapper(Regex::new("[be]").unwrap())), DataValue::Str("x".into()) ]) - .unwrap(), + .unwrap(), DataValue::Str("axcdef".into()) ); @@ -744,7 +744,7 @@ fn test_regex() { DataValue::Regex(RegexWrapper(Regex::new("[be]").unwrap())), DataValue::Str("x".into()) ]) - .unwrap(), + .unwrap(), DataValue::Str("axcdxf".into()) ); assert_eq!( @@ -752,7 +752,7 @@ fn test_regex() { DataValue::Str("abCDefGH".into()), DataValue::Regex(RegexWrapper(Regex::new("[xayef]|(GH)").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::Str("a".into()), DataValue::Str("e".into()), @@ -765,7 +765,7 @@ fn test_regex() { DataValue::Str("abCDefGH".into()), DataValue::Regex(RegexWrapper(Regex::new("[xayef]|(GH)").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::Str("a".into()), ); assert_eq!( @@ -773,7 +773,7 @@ fn test_regex() { DataValue::Str("abCDefGH".into()), DataValue::Regex(RegexWrapper(Regex::new("xyz").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::List(vec![]) ); @@ -782,7 +782,7 @@ fn test_regex() { DataValue::Str("abCDefGH".into()), DataValue::Regex(RegexWrapper(Regex::new("xyz").unwrap())) ]) - .unwrap(), + .unwrap(), DataValue::Null ); } @@ -902,7 +902,7 @@ fn test_prepend_append() { DataValue::List(vec![DataValue::from(1), DataValue::from(2)]), DataValue::Null, ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::Null, DataValue::from(1), @@ -914,7 +914,7 @@ fn test_prepend_append() { DataValue::List(vec![DataValue::from(1), DataValue::from(2)]), DataValue::Null, ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::from(1), DataValue::from(2), @@ -957,7 +957,7 @@ fn test_sort_reverse() { DataValue::from(2), DataValue::Null, ])]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::Null, DataValue::from(1), @@ -972,7 +972,7 @@ fn test_sort_reverse() { DataValue::from(2), DataValue::Null, ])]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::Null, DataValue::from(2), @@ -990,9 +990,9 @@ fn test_haversine() { DataValue::from(0), DataValue::from(180), ]) - .unwrap() - .get_float() - .unwrap(); + .unwrap() + .get_float() + .unwrap(); assert!(d.abs_diff_eq(&f64::PI(), 1e-5)); let d = op_haversine_deg_input(&[ @@ -1001,9 +1001,9 @@ fn test_haversine() { DataValue::from(0), DataValue::from(123), ]) - .unwrap() - .get_float() - .unwrap(); + .unwrap() + .get_float() + .unwrap(); assert!(d.abs_diff_eq(&(f64::PI() / 2.), 1e-5)); let d = op_haversine(&[ @@ -1012,9 +1012,9 @@ fn test_haversine() { DataValue::from(0), DataValue::from(f64::PI()), ]) - .unwrap() - .get_float() - .unwrap(); + .unwrap() + .get_float() + .unwrap(); assert!(d.abs_diff_eq(&f64::PI(), 1e-5)); } @@ -1045,7 +1045,7 @@ fn test_first_last() { DataValue::from(1), DataValue::from(2), ])]) - .unwrap(), + .unwrap(), DataValue::from(1), ); assert_eq!( @@ -1053,7 +1053,7 @@ fn test_first_last() { DataValue::from(1), DataValue::from(2), ])]) - .unwrap(), + .unwrap(), DataValue::from(2), ); } @@ -1071,7 +1071,7 @@ fn test_chunks() { ]), DataValue::from(2), ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::List(vec![DataValue::from(1), DataValue::from(2)]), DataValue::List(vec![DataValue::from(3), DataValue::from(4)]), @@ -1089,7 +1089,7 @@ fn test_chunks() { ]), DataValue::from(2), ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::List(vec![DataValue::from(1), DataValue::from(2)]), DataValue::List(vec![DataValue::from(3), DataValue::from(4)]), @@ -1106,7 +1106,7 @@ fn test_chunks() { ]), DataValue::from(3), ]) - .unwrap(), + .unwrap(), DataValue::List(vec![ DataValue::List(vec![ DataValue::from(1), @@ -1139,7 +1139,7 @@ fn test_get() { ]), DataValue::from(1) ]) - .unwrap(), + .unwrap(), DataValue::from(2) ); assert_eq!( @@ -1155,7 +1155,7 @@ fn test_get() { ]), DataValue::from(1) ]) - .unwrap(), + .unwrap(), DataValue::from(2) ); } @@ -1171,7 +1171,7 @@ fn test_slice() { DataValue::from(1), DataValue::from(4) ]) - .is_err()); + .is_err()); assert_eq!( op_slice(&[ @@ -1183,7 +1183,7 @@ fn test_slice() { DataValue::from(1), DataValue::from(-1) ]) - .unwrap(), + .unwrap(), DataValue::List(vec![DataValue::from(2)]) ); } @@ -1285,7 +1285,7 @@ fn test_set_ops() { DataValue::List([2, 3, 4].into_iter().map(DataValue::from).collect()), DataValue::List([3, 4, 5].into_iter().map(DataValue::from).collect()) ]) - .unwrap(), + .unwrap(), DataValue::List([1, 2, 3, 4, 5].into_iter().map(DataValue::from).collect()) ); assert_eq!( @@ -1299,7 +1299,7 @@ fn test_set_ops() { DataValue::List([2, 3, 4].into_iter().map(DataValue::from).collect()), DataValue::List([3, 4, 5].into_iter().map(DataValue::from).collect()) ]) - .unwrap(), + .unwrap(), DataValue::List([3, 4].into_iter().map(DataValue::from).collect()) ); assert_eq!( @@ -1313,7 +1313,7 @@ fn test_set_ops() { DataValue::List([2, 3, 4].into_iter().map(DataValue::from).collect()), DataValue::List([3, 4, 5].into_iter().map(DataValue::from).collect()) ]) - .unwrap(), + .unwrap(), DataValue::List([1, 6].into_iter().map(DataValue::from).collect()) ); } @@ -1325,7 +1325,10 @@ fn test_uuid() { assert!(op_is_uuid(&[v4]).unwrap().get_bool().unwrap()); assert!(op_uuid_timestamp(&[v1]).unwrap().get_float().is_some()); assert!(op_to_uuid(&[DataValue::Str(SmartString::from(""))]).is_err()); - assert!(op_to_uuid(&[DataValue::Str(SmartString::from("f3b4958c-52a1-11e7-802a-010203040506"))]).is_ok()); + assert!(op_to_uuid(&[DataValue::Str(SmartString::from( + "f3b4958c-52a1-11e7-802a-010203040506" + ))]) + .is_ok()); } #[test] @@ -1334,4 +1337,9 @@ fn test_now() { assert!(matches!(now, DataValue::Num(_))); let s = op_format_timestamp(&[now]).unwrap(); let _dt = op_parse_timestamp(&[s]).unwrap(); -} \ No newline at end of file +} + +#[test] +fn test_to_bool() { + todo!() +} diff --git a/src/data/tests/mod.rs b/src/data/tests/mod.rs index 96b8321d..8f8af486 100644 --- a/src/data/tests/mod.rs +++ b/src/data/tests/mod.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ mod functions; diff --git a/src/data/tuple.rs b/src/data/tuple.rs index 3744ff3b..6dc267a8 100644 --- a/src/data/tuple.rs +++ b/src/data/tuple.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::fmt::{Debug, Formatter}; diff --git a/src/data/value.rs b/src/data/value.rs index b8ac0c92..231d5141 100644 --- a/src/data/value.rs +++ b/src/data/value.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Ordering; diff --git a/src/lib.rs b/src/lib.rs index ade915c8..cc5a2303 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ //! This crate provides the core functionalities of [CozoDB](https://github.com/cozodb/cozo). diff --git a/src/parse/expr.rs b/src/parse/expr.rs index f23a7ebf..cbc98b8b 100644 --- a/src/parse/expr.rs +++ b/src/parse/expr.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/parse/mod.rs b/src/parse/mod.rs index f0246e91..a3c97c97 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::{max, min}; diff --git a/src/parse/query.rs b/src/parse/query.rs index bf5921d3..3061e943 100644 --- a/src/parse/query.rs +++ b/src/parse/query.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::btree_map::Entry; diff --git a/src/parse/schema.rs b/src/parse/schema.rs index 6046f2b5..fd1abc1a 100644 --- a/src/parse/schema.rs +++ b/src/parse/schema.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeSet; diff --git a/src/parse/sys.rs b/src/parse/sys.rs index 3d1c1b04..3ba3cda1 100644 --- a/src/parse/sys.rs +++ b/src/parse/sys.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/query/compile.rs b/src/query/compile.rs index ef52fd8b..98297a41 100644 --- a/src/query/compile.rs +++ b/src/query/compile.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/query/eval.rs b/src/query/eval.rs index 94ac3a73..8e1c4abd 100644 --- a/src/query/eval.rs +++ b/src/query/eval.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/query/graph.rs b/src/query/graph.rs index 12b6c409..cec5bc4f 100644 --- a/src/query/graph.rs +++ b/src/query/graph.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/query/logical.rs b/src/query/logical.rs index e91ecb5c..350ed7cb 100644 --- a/src/query/logical.rs +++ b/src/query/logical.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeSet; diff --git a/src/query/magic.rs b/src/query/magic.rs index eaa00d60..b2e98067 100644 --- a/src/query/magic.rs +++ b/src/query/magic.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeSet; diff --git a/src/query/mod.rs b/src/query/mod.rs index e546fd4b..94ebae47 100644 --- a/src/query/mod.rs +++ b/src/query/mod.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ pub(crate) mod compile; diff --git a/src/query/relation.rs b/src/query/relation.rs index c2edff76..5bda391d 100644 --- a/src/query/relation.rs +++ b/src/query/relation.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::{BTreeMap, BTreeSet}; diff --git a/src/query/reorder.rs b/src/query/reorder.rs index 43562a86..e8d532f1 100644 --- a/src/query/reorder.rs +++ b/src/query/reorder.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeSet; diff --git a/src/query/sort.rs b/src/query/sort.rs index 3b4d7c66..80166afa 100644 --- a/src/query/sort.rs +++ b/src/query/sort.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::cmp::Ordering; diff --git a/src/query/stored.rs b/src/query/stored.rs index cf49643f..37972ffa 100644 --- a/src/query/stored.rs +++ b/src/query/stored.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/query/stratify.rs b/src/query/stratify.rs index 3f90f08f..52876d68 100644 --- a/src/query/stratify.rs +++ b/src/query/stratify.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::btree_map::Entry; diff --git a/src/runtime/db.rs b/src/runtime/db.rs index 39875834..6bd2732c 100644 --- a/src/runtime/db.rs +++ b/src/runtime/db.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::collections::BTreeMap; diff --git a/src/runtime/in_mem.rs b/src/runtime/in_mem.rs index 926ac5bc..905ca1c3 100644 --- a/src/runtime/in_mem.rs +++ b/src/runtime/in_mem.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::borrow::BorrowMut; diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs index ee2ca16f..1105a2e2 100644 --- a/src/runtime/mod.rs +++ b/src/runtime/mod.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ pub(crate) mod db; diff --git a/src/runtime/relation.rs b/src/runtime/relation.rs index 044d9127..27d6e44c 100644 --- a/src/runtime/relation.rs +++ b/src/runtime/relation.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::fmt::{Debug, Display, Formatter}; diff --git a/src/runtime/transact.rs b/src/runtime/transact.rs index 264c05a5..5f2cab13 100644 --- a/src/runtime/transact.rs +++ b/src/runtime/transact.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ use std::sync::Arc; diff --git a/src/utils.rs b/src/utils.rs index 977bd235..ec50f43a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,5 +1,5 @@ /* - * Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later. + * Copyright 2022, The Cozo Project Authors. Licensed under MPL-2.0. */ #[inline(always)]