copyright notice

main
Ziyang Hu 2 years ago
parent 3f89d91e35
commit 6945a76287

@ -1,5 +1,3 @@
# Cozorocks # Cozorocks
Bindings to RocksDB's C++ API. Bindings to RocksDB's C++ API.
Much of the build script is built upon https://github.com/rust-rocksdb/rust-rocksdb/tree/master/librocksdb-sys.

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_BRIDGE_H #ifndef COZOROCKS_BRIDGE_H
#define COZOROCKS_BRIDGE_H #define COZOROCKS_BRIDGE_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_ROCKS_BRIDGE_H #ifndef COZOROCKS_ROCKS_BRIDGE_H
#define COZOROCKS_ROCKS_BRIDGE_H #define COZOROCKS_ROCKS_BRIDGE_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#include <iostream> #include <iostream>
#include <memory> #include <memory>

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_DB_H #ifndef COZOROCKS_DB_H
#define COZOROCKS_DB_H #define COZOROCKS_DB_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_ITER_H #ifndef COZOROCKS_ITER_H
#define COZOROCKS_ITER_H #define COZOROCKS_ITER_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_OPTS_H #ifndef COZOROCKS_OPTS_H
#define COZOROCKS_OPTS_H #define COZOROCKS_OPTS_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_SLICE_H #ifndef COZOROCKS_SLICE_H
#define COZOROCKS_SLICE_H #define COZOROCKS_SLICE_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#include "status.h" #include "status.h"
#include "cozorocks/src/bridge/mod.rs.h" #include "cozorocks/src/bridge/mod.rs.h"

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_STATUS_H #ifndef COZOROCKS_STATUS_H
#define COZOROCKS_STATUS_H #define COZOROCKS_STATUS_H

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#include "tx.h" #include "tx.h"
#include "cozorocks/src/bridge/mod.rs.h" #include "cozorocks/src/bridge/mod.rs.h"

@ -1,6 +1,6 @@
// /*
// Created by Ziyang Hu on 2022/7/3. * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
// */
#ifndef COZOROCKS_TX_H #ifndef COZOROCKS_TX_H
#define COZOROCKS_TX_H #define COZOROCKS_TX_H

@ -1,3 +1,9 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
* Much of the build script is built upon:
* https://github.com/rust-rocksdb/rust-rocksdb/tree/master/librocksdb-sys.
*/
use std::path::Path; use std::path::Path;
use std::{env, fs, process::Command}; use std::{env, fs, process::Command};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
*/
use std::borrow::Cow; use std::borrow::Cow;
use cxx::*; use cxx::*;

@ -1,3 +1,8 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
*/
use cxx::UniquePtr; use cxx::UniquePtr;
use crate::bridge::ffi::*; use crate::bridge::ffi::*;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
*/
use std::error::Error; use std::error::Error;
use std::fmt::{Display, Formatter}; use std::fmt::{Display, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
*/
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};
use std::ops::Deref; use std::ops::Deref;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause.
*/
pub use bridge::db::DbBuilder; pub use bridge::db::DbBuilder;
pub use bridge::db::RocksDb; pub use bridge::db::RocksDb;
pub use bridge::ffi::RocksDbStatus; pub use bridge::ffi::RocksDbStatus;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::Reverse; use std::cmp::Reverse;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::Reverse; use std::cmp::Reverse;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet, VecDeque}; use std::collections::{BTreeMap, BTreeSet, VecDeque};
use miette::{Result}; use miette::{Result};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use miette::{bail, ensure, Diagnostic, Result}; use miette::{bail, ensure, Diagnostic, Result};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use csv::StringRecord; use csv::StringRecord;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use miette::Result; use miette::Result;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use miette::Result; use miette::Result;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::fs::File; use std::fs::File;
use std::io::BufRead; use std::io::BufRead;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::Reverse; use std::cmp::Reverse;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use miette::{bail, ensure, Diagnostic, Result}; use miette::{bail, ensure, Diagnostic, Result};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::mem; use std::mem;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::Reverse; use std::cmp::Reverse;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::{Ordering, Reverse}; use std::cmp::{Ordering, Reverse};
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::iter; use std::iter;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::min; use std::cmp::min;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use miette::Result; use miette::Result;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use miette::Result; use miette::Result;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::fmt::Debug; use std::fmt::Debug;
use std::fs; use std::fs;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
script = _{sys_script | multi_script | query_script} script = _{sys_script | multi_script | query_script}
query_script = {SOI ~ (option | rule | const_rule | algo_rule)+ ~ EOI} query_script = {SOI ~ (option | rule | const_rule | algo_rule)+ ~ EOI}
query_script_inner = {"{" ~ (option | rule | const_rule | algo_rule)+ ~ "}"} query_script_inner = {"{" ~ (option | rule | const_rule | algo_rule)+ ~ "}"}

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::fmt::{Debug, Display, Formatter}; use std::fmt::{Debug, Display, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::ops::{Div, Rem}; use std::ops::{Div, Rem};
use std::str::FromStr; use std::str::FromStr;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use serde_json::json; use serde_json::json;
pub(crate) use serde_json::Value as JsonValue; pub(crate) use serde_json::Value as JsonValue;
use smartstring::SmartString; use smartstring::SmartString;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
pub(crate) mod json; pub(crate) mod json;
pub(crate) mod symb; pub(crate) mod symb;
pub(crate) mod value; pub(crate) mod value;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::btree_map::Entry; use std::collections::btree_map::Entry;
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::fmt::{Debug, Display, Formatter}; use std::fmt::{Debug, Display, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::fmt::{Display, Formatter}; use std::fmt::{Display, Formatter};
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::Ordering; use std::cmp::Ordering;
use std::fmt::{Debug, Display, Formatter}; use std::fmt::{Debug, Display, Formatter};
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use approx::AbsDiffEq; use approx::AbsDiffEq;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use approx::AbsDiffEq; use approx::AbsDiffEq;
use num_traits::FloatConst; use num_traits::FloatConst;
use regex::Regex; use regex::Regex;

@ -1,2 +1,6 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
mod functions; mod functions;
mod aggrs; mod aggrs;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::{max, min, Ordering}; use std::cmp::{max, min, Ordering};
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::{Ordering, Reverse}; use std::cmp::{Ordering, Reverse};
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::fmt::{Debug, Display, Formatter}; use std::fmt::{Debug, Display, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
#![warn(rust_2018_idioms, future_incompatible)] #![warn(rust_2018_idioms, future_incompatible)]
pub use miette::Error; pub use miette::Error;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::btree_map::Entry; use std::collections::btree_map::Entry;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::error::Error; use std::error::Error;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeSet; use std::collections::BTreeSet;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::mem; use std::mem;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::fmt::Debug; use std::fmt::Debug;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeSet; use std::collections::BTreeSet;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::mem; use std::mem;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
pub(crate) mod compile; pub(crate) mod compile;
pub(crate) mod eval; pub(crate) mod eval;
pub(crate) mod graph; pub(crate) mod graph;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};
use std::iter; use std::iter;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::mem; use std::mem;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::Reverse; use std::cmp::Reverse;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::BTreeMap; use std::collections::BTreeMap;
use itertools::Itertools; use itertools::Itertools;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::collections::btree_map::Entry; use std::collections::btree_map::Entry;
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::{fs, thread}; use std::{fs, thread};
use std::cmp::Ordering::Greater; use std::cmp::Ordering::Greater;
use std::collections::BTreeMap; use std::collections::BTreeMap;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::borrow::BorrowMut; use std::borrow::BorrowMut;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
pub(crate) mod db; pub(crate) mod db;
pub(crate) mod transact; pub(crate) mod transact;
pub(crate) mod in_mem; pub(crate) mod in_mem;

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::cmp::max; use std::cmp::max;
use std::cmp::Ordering::Greater; use std::cmp::Ordering::Greater;
use std::fmt::{Debug, Display, Formatter}; use std::fmt::{Debug, Display, Formatter};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::sync::Arc; use std::sync::Arc;
use std::sync::atomic::{AtomicU32, AtomicU64, Ordering}; use std::sync::atomic::{AtomicU32, AtomicU64, Ordering};

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
#[inline(always)] #[inline(always)]
pub(crate) fn swap_option_result<T, E>(d: Result<Option<T>, E>) -> Option<Result<T, E>> { pub(crate) fn swap_option_result<T, E>(d: Result<Option<T>, E>) -> Option<Result<T, E>> {
match d { match d {

@ -1,3 +1,7 @@
/*
* Copyright 2022, The Cozo Project Authors. Licensed under AGPL-3 or later.
*/
use std::str::FromStr; use std::str::FromStr;
use std::time::Instant; use std::time::Instant;

Loading…
Cancel
Save