Skip to content

Commit fac2f19

Browse files
committed
chore: rename
1 parent 85cf196 commit fac2f19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+252
-269
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Cargo.lock
2323
/hello_world
2424
/transaction
2525

26-
fncksql_data
27-
fncksql_bench
26+
kitesql_data
27+
kitesql_bench
2828
sqlite_bench
29-
fnck_sql_tpcc
29+
kite_sql_tpcc
3030
copy.csv
3131

3232
tests/data/row_20000.csv

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
22

33
[package]
4-
name = "fnck_sql"
5-
version = "0.0.10"
4+
name = "kite_sql"
5+
version = "0.1.0"
66
edition = "2021"
77
authors = ["Kould <kould2333@gmail.com>", "Xwg <loloxwg@gmail.com>"]
88
description = "SQL as a Function for Rust"
9-
documentation = "https://docs.rs/fnck_sql/latest/fnck_sql/"
9+
documentation = "https://docs.rs/kite_sql/latest/kite_sql/"
1010
license = "Apache-2.0"
1111
repository = "https://github.com/KipData/KipSQL"
1212
readme = "README.md"
1313
keywords = ["sql", "sqlite", "database", "mysql"]
1414
categories = ["development-tools", "database"]
15-
default-run = "fnck_sql"
15+
default-run = "kite_sql"
1616

1717
[[bin]]
18-
name = "fnck_sql"
18+
name = "kite_sql"
1919
path = "src/bin/server.rs"
2020
required-features = ["net"]
2121

@@ -51,7 +51,7 @@ regex = { version = "1" }
5151
rocksdb = { version = "0.22" }
5252
rust_decimal = { version = "1" }
5353
serde = { version = "1", features = ["derive", "rc"] }
54-
fnck_sql_serde_macros = { version = "0.1.0", path = "fnck_sql_serde_macros" }
54+
kite_sql_serde_macros = { version = "0.1.0", path = "kite_sql_serde_macros" }
5555
siphasher = { version = "1", features = ["serde"] }
5656
sqlparser = { version = "0.34", features = ["serde"] }
5757
thiserror = { version = "1" }
@@ -82,7 +82,7 @@ pprof = { version = "0.13", features = ["flamegraph", "criterion"] }
8282
members = [
8383
"tests/sqllogictest",
8484
"tests/macros-test",
85-
"fnck_sql_serde_macros",
85+
"kite_sql_serde_macros",
8686
"tpcc"]
8787

8888
[profile.release]

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib n
1515
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" >> /etc/apt/sources.list
1616
RUN apt-get update && apt-get install -y postgresql-client
1717

18-
ARG APP_SERVER=fnck_sql
18+
ARG APP_SERVER=kite_sql
1919

20-
WORKDIR /fnck_sql
20+
WORKDIR /kite_sql
2121

2222
EXPOSE 5432
2323

2424
COPY --from=builder /builder/target/release/${APP_SERVER} ${APP_SERVER}
2525

26-
ENTRYPOINT ["./fnck_sql", "--ip", "0.0.0.0"]
26+
ENTRYPOINT ["./kite_sql", "--ip", "0.0.0.0"]

README.md

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,32 @@
1-
<pre align="center">
2-
Built by @KipData
3-
4-
5-
███████╗███╗ ██╗ ██████╗██╗ ██╗ ███████╗ ██████╗ ██╗
6-
██╔════╝████╗ ██║██╔════╝██║ ██╔╝ ██╔════╝██╔═══██╗██║
7-
█████╗ ██╔██╗ ██║██║ █████╔╝ ███████╗██║ ██║██║
8-
██╔══╝ ██║╚██╗██║██║ ██╔═██╗ ╚════██║██║▄▄ ██║██║
9-
██║ ██║ ╚████║╚██████╗██║ ██╗ ███████║╚██████╔╝███████╗
10-
╚═╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝ ╚══▀▀═╝ ╚══════╝
1+
<p align="center">
2+
<picture>
3+
<source srcset="./static/images/kite_sql_dark.png" media="(prefers-color-scheme: dark)">
4+
<source srcset="./static/images/kite_sql_light.png" media="(prefers-color-scheme: light)">
5+
<img src="./static/images/kite_sql_light.png" alt="KiteSQL Logo" width="400px">
6+
</picture>
7+
</p>
118

12-
-----------------------------------
13-
🖕
14-
</pre>
159
<h3 align="center">
1610
SQL as a Function for Rust
1711
</h3>
1812

1913
<p align="center">
2014
<a href="https://summer-ospp.ac.cn/org/orgdetail/0b09d23d-2510-4537-aa9d-45158bb6bdc2"><img src="https://img.shields.io/badge/OSPP-KipData-3DA639?logo=opensourceinitiative"></a>
21-
<a href="https://github.com/KipData/FnckSQL/blob/main/LICENSE"><img src="https://img.shields.io/github/license/KipData/FnckSQL"></a>
15+
<a href="https://github.com/KipData/KiteSQL/blob/main/LICENSE"><img src="https://img.shields.io/github/license/KipData/KiteSQL"></a>
2216
&nbsp;
2317
<a href="https://www.rust-lang.org/community"><img src="https://img.shields.io/badge/Rust_Community%20-Join_us-brightgreen?style=plastic&logo=rust"></a>
2418
</p>
2519
<p align="center">
26-
<a href="https://github.com/KipData/FnckSQL/actions/workflows/ci.yml"><img src="https://github.com/KipData/FnckSQL/actions/workflows/ci.yml/badge.svg" alt="CI"></img></a>
27-
<a href="https://crates.io/crates/fnck_sql/"><img src="https://img.shields.io/crates/v/fnck_sql.svg"></a>
28-
<a href="https://github.com/KipData/FnckSQL" target="_blank">
29-
<img src="https://img.shields.io/github/stars/KipData/FnckSQL.svg?style=social" alt="github star"/>
30-
<img src="https://img.shields.io/github/forks/KipData/FnckSQL.svg?style=social" alt="github fork"/>
20+
<a href="https://github.com/KipData/KiteSQL/actions/workflows/ci.yml"><img src="https://github.com/KipData/KiteSQL/actions/workflows/ci.yml/badge.svg" alt="CI"></img></a>
21+
<a href="https://crates.io/crates/kite_sql/"><img src="https://img.shields.io/crates/v/kite_sql.svg"></a>
22+
<a href="https://github.com/KipData/KiteSQL" target="_blank">
23+
<img src="https://img.shields.io/github/stars/KipData/KiteSQL.svg?style=social" alt="github star"/>
24+
<img src="https://img.shields.io/github/forks/KipData/KiteSQL.svg?style=social" alt="github fork"/>
3125
</a>
3226
</p>
3327

3428
## Introduction
35-
**FnckSQL** is a lightweight embedded database inspired by **MyRocks** and **SQLite** and completely coded in Rust. It aims to provide a more user-friendly, lightweight, and low-loss RDBMS for Rust programming so that the APP does not rely on other complex components. can perform complex relational data operations
29+
**KiteSQL** is a lightweight embedded database inspired by **MyRocks** and **SQLite** and completely coded in Rust. It aims to provide a more user-friendly, lightweight, and low-loss RDBMS for Rust programming so that the APP does not rely on other complex components. can perform complex relational data operations
3630

3731
## Key Features
3832
- A lightweight embedded SQL database fully rewritten in Rust
@@ -46,16 +40,16 @@ Built by @KipData
4640
## Examples
4741

4842
```rust
49-
let fnck_sql = DataBaseBuilder::path("./data").build()?;
43+
let kite_sql = DataBaseBuilder::path("./data").build()?;
5044

51-
fnck_sql
45+
kite_sql
5246
.run("create table if not exists t1 (c1 int primary key, c2 int)")?
5347
.done()?;
54-
fnck_sql
48+
kite_sql
5549
.run("insert into t1 values(0, 0), (1, 1)")?
5650
.done()?;
5751

58-
for tuple in fnck_sql.run("select * from t1")? {
52+
for tuple in kite_sql.run("select * from t1")? {
5953
println!("{:?}", tuple?);
6054
}
6155
```
@@ -84,15 +78,15 @@ Order-Status : 0.053 (0.175)
8478
#### 👉[check more](tpcc/README.md)
8579

8680
## Roadmap
87-
- Get [SQL 2016](https://github.com/KipData/FnckSQL/issues/130) mostly supported
88-
- LLVM JIT: [Perf: TPCC](https://github.com/KipData/FnckSQL/issues/247)
81+
- Get [SQL 2016](https://github.com/KipData/KiteSQL/issues/130) mostly supported
82+
- LLVM JIT: [Perf: TPCC](https://github.com/KipData/KiteSQL/issues/247)
8983

9084
## License
9185

92-
FnckSQL uses the [Apache 2.0 license][1] to strike a balance between
86+
KiteSQL uses the [Apache 2.0 license][1] to strike a balance between
9387
open contributions and allowing you to use the software however you want.
9488

95-
[1]: <https://github.com/KipData/FnckSQL/blob/main/LICENSE>
89+
[1]: <https://github.com/KipData/KiteSQL/blob/main/LICENSE>
9690

9791
## Contributors
98-
[![](https://opencollective.com/fncksql/contributors.svg?width=890&button=false)](https://github.com/KipData/FnckSQL/graphs/contributors)
92+
[![](https://opencollective.com/kitesql/contributors.svg?width=890&button=false)](https://github.com/KipData/KiteSQL/graphs/contributors)

benchmarks/query_benchmark.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use criterion::{criterion_group, criterion_main, Criterion};
2-
use fnck_sql::db::{DataBaseBuilder, ResultIter};
3-
use fnck_sql::errors::DatabaseError;
42
use indicatif::{ProgressBar, ProgressStyle};
53
use itertools::Itertools;
4+
use kite_sql::db::{DataBaseBuilder, ResultIter};
5+
use kite_sql::errors::DatabaseError;
66
#[cfg(unix)]
77
use pprof::criterion::{Output, PProfProfiler};
88
use sqlite::Error;
99
use std::fs;
1010
use std::path::Path;
1111

12-
const QUERY_BENCH_FNCK_SQL_PATH: &'static str = "./fncksql_bench";
12+
const QUERY_BENCH_kite_sql_PATH: &'static str = "./kitesql_bench";
1313
const QUERY_BENCH_SQLITE_PATH: &'static str = "./sqlite_bench";
1414
const TABLE_ROW_NUM: u64 = 200_000;
1515

@@ -24,8 +24,8 @@ fn query_cases() -> Vec<(&'static str, &'static str)> {
2424
]
2525
}
2626

27-
fn init_fncksql_query_bench() -> Result<(), DatabaseError> {
28-
let database = DataBaseBuilder::path(QUERY_BENCH_FNCK_SQL_PATH).build()?;
27+
fn init_kitesql_query_bench() -> Result<(), DatabaseError> {
28+
let database = DataBaseBuilder::path(QUERY_BENCH_kite_sql_PATH).build()?;
2929
database
3030
.run("create table t1 (c1 int primary key, c2 int)")?
3131
.done()?;
@@ -84,21 +84,21 @@ fn query_on_execute(c: &mut Criterion) {
8484

8585
init_sqlite_query_bench().unwrap();
8686
}
87-
if !path_exists_and_is_directory(QUERY_BENCH_FNCK_SQL_PATH) {
87+
if !path_exists_and_is_directory(QUERY_BENCH_kite_sql_PATH) {
8888
println!(
89-
"FnckSQL: The table is not initialized and data insertion is started. => {}",
89+
"KiteSQL: The table is not initialized and data insertion is started. => {}",
9090
TABLE_ROW_NUM
9191
);
9292

93-
init_fncksql_query_bench().unwrap();
93+
init_kitesql_query_bench().unwrap();
9494
}
95-
let database = DataBaseBuilder::path(QUERY_BENCH_FNCK_SQL_PATH)
95+
let database = DataBaseBuilder::path(QUERY_BENCH_kite_sql_PATH)
9696
.build()
9797
.unwrap();
9898
println!("Table initialization completed");
9999

100100
for (name, case) in query_cases() {
101-
c.bench_function(format!("FnckSQL: {} by '{}'", name, case).as_str(), |b| {
101+
c.bench_function(format!("KiteSQL: {} by '{}'", name, case).as_str(), |b| {
102102
b.iter(|| {
103103
for tuple in database.run(case).unwrap() {
104104
let _ = tuple.unwrap();

docs/features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ scala_function!(TestFunction::test(LogicalType::Integer, LogicalType::Integer) -
3737
Ok(plus_unary_evaluator.unary_eval(&value))
3838
});
3939

40-
let fnck_sql = DataBaseBuilder::path("./data")
40+
let kite_sql = DataBaseBuilder::path("./data")
4141
.register_scala_function(TestFunction::new())
4242
.build()?;
4343
```
@@ -57,7 +57,7 @@ table_function!(MyTableFunction::test_numbers(LogicalType::Integer) -> [c1: Logi
5757
]
5858
}))) as Box<dyn Iterator<Item = Result<Tuple, DatabaseError>>>)
5959
}));
60-
let fnck_sql = DataBaseBuilder::path("./data")
60+
let kite_sql = DataBaseBuilder::path("./data")
6161
.register_table_function(MyTableFunction::new())
6262
.build()?;
6363
```

examples/hello_world.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use fnck_sql::db::{DataBaseBuilder, ResultIter};
2-
use fnck_sql::errors::DatabaseError;
3-
use fnck_sql::implement_from_tuple;
4-
use fnck_sql::types::value::DataValue;
1+
use kite_sql::db::{DataBaseBuilder, ResultIter};
2+
use kite_sql::errors::DatabaseError;
3+
use kite_sql::implement_from_tuple;
4+
use kite_sql::types::value::DataValue;
55

66
#[derive(Default, Debug, PartialEq)]
77
struct MyStruct {

examples/transaction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use fnck_sql::db::{DataBaseBuilder, ResultIter};
2-
use fnck_sql::errors::DatabaseError;
1+
use kite_sql::db::{DataBaseBuilder, ResultIter};
2+
use kite_sql::errors::DatabaseError;
33

44
fn main() -> Result<(), DatabaseError> {
55
let database = DataBaseBuilder::path("./transaction").build()?;

fnck_sql_serde_macros/Cargo.toml renamed to kite_sql_serde_macros/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
2-
name = "fnck_sql_serde_macros"
2+
name = "kite_sql_serde_macros"
33
version = "0.1.0"
44
edition = "2021"
5-
description = "SerdeMacros for FnckSQL"
5+
description = "SerdeMacros for KiteSQL"
66
license = "Apache-2.0"
77

88
[dependencies]
File renamed without changes.

src/bin/server.rs

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use async_trait::async_trait;
22
use clap::Parser;
3-
use fnck_sql::db::{DBTransaction, DataBaseBuilder, Database, ResultIter};
4-
use fnck_sql::errors::DatabaseError;
5-
use fnck_sql::storage::rocksdb::RocksStorage;
6-
use fnck_sql::types::tuple::{Schema, SchemaRef, Tuple};
7-
use fnck_sql::types::LogicalType;
83
use futures::stream;
4+
use kite_sql::db::{DBTransaction, DataBaseBuilder, Database, ResultIter};
5+
use kite_sql::errors::DatabaseError;
6+
use kite_sql::storage::rocksdb::RocksStorage;
7+
use kite_sql::types::tuple::{Schema, SchemaRef, Tuple};
8+
use kite_sql::types::LogicalType;
99
use log::{error, info, LevelFilter};
1010
use parking_lot::Mutex;
1111
use pgwire::api::auth::noop::NoopStartupHandler;
@@ -25,35 +25,24 @@ use std::sync::Arc;
2525
use tokio::net::TcpListener;
2626

2727
pub(crate) const BANNER: &str = "
28-
███████╗███╗ ██╗ ██████╗██╗ ██╗ ███████╗ ██████╗ ██╗
29-
██╔════╝████╗ ██║██╔════╝██║ ██╔╝ ██╔════╝██╔═══██╗██║
30-
█████╗ ██╔██╗ ██║██║ █████╔╝ ███████╗██║ ██║██║
31-
██╔══╝ ██║╚██╗██║██║ ██╔═██╗ ╚════██║██║▄▄ ██║██║
32-
██║ ██║ ╚████║╚██████╗██║ ██╗ ███████║╚██████╔╝███████╗
33-
╚═╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝ ╚══▀▀═╝ ╚══════╝
28+
oooo oooo o8o . .oooooo..o .oooooo. ooooo
29+
`888 .8P' `\"' .o8 d8P' `Y8 d8P' `Y8b `888'
30+
888 d8' oooo .o888oo .ooooo. Y88bo. 888 888 888
31+
88888[ `888 888 d88' `88b `\"Y8888o. 888 888 888
32+
888`88b. 888 888 888ooo888 `\"Y88b 888 888 888
33+
888 `88b. 888 888 . 888 .o oo .d8P `88b d88b 888 o
34+
o888o o888o o888o \"888\" `Y8bod8P' 8\"\"88888P' `Y8bood8P'Ybd' o888ooooood8
3435
3536
";
3637

37-
pub const BLOOM: &str = "
38-
_ ._ _ , _ ._
39-
(_ ' ( ` )_ .__)
40-
( ( ( ) `) ) _)
41-
- --=(;;(----(-----)-----);;)==-- -
42-
(__ (_ (_ . _) _) ,__)
43-
`~~`\\ ' . /`~~`
44-
; ;
45-
/ \\
46-
_____________/_ __ \\_____________
47-
";
48-
4938
#[derive(Parser, Debug)]
5039
#[command(author, version, about, long_about = None)]
5140
struct Args {
5241
#[clap(long, default_value = "127.0.0.1")]
5342
ip: String,
5443
#[clap(long, default_value = "5432")]
5544
port: u16,
56-
#[clap(long, default_value = "./fncksql_data")]
45+
#[clap(long, default_value = "./kitesql_data")]
5746
path: String,
5847
}
5948

@@ -76,15 +65,15 @@ impl DerefMut for TransactionPtr {
7665
unsafe impl Send for TransactionPtr {}
7766
unsafe impl Sync for TransactionPtr {}
7867

79-
pub struct FnckSQLBackend {
68+
pub struct KiteSQLBackend {
8069
inner: Arc<Database<RocksStorage>>,
8170
}
8271

83-
impl FnckSQLBackend {
84-
pub fn new(path: impl Into<PathBuf> + Send) -> Result<FnckSQLBackend, DatabaseError> {
72+
impl KiteSQLBackend {
73+
pub fn new(path: impl Into<PathBuf> + Send) -> Result<KiteSQLBackend, DatabaseError> {
8574
let database = DataBaseBuilder::path(path).build()?;
8675

87-
Ok(FnckSQLBackend {
76+
Ok(KiteSQLBackend {
8877
inner: Arc::new(database),
8978
})
9079
}
@@ -350,15 +339,15 @@ async fn main() {
350339

351340
let args = Args::parse();
352341
info!("{} \nVersion: {}\n", BANNER, env!("CARGO_PKG_VERSION"));
353-
info!(":) Welcome to the FnckSQL🖕");
342+
info!(":) Welcome to the KiteSQL🪁");
354343
info!("Listen on port {}", args.port);
355-
info!("Tips🔞: ");
344+
info!("Tips: ");
356345
info!(
357346
"1. all data is in the \'{}\' folder in the directory where the application is run",
358347
args.path
359348
);
360349

361-
let backend = FnckSQLBackend::new(args.path).unwrap();
350+
let backend = KiteSQLBackend::new(args.path).unwrap();
362351
let factory = Arc::new(CustomBackendFactory::new(Arc::new(SessionBackend::new(
363352
backend.inner,
364353
))));
@@ -371,7 +360,7 @@ async fn main() {
371360
error!("[Listener][Failed To Accept]: {}", err);
372361
}
373362
}
374-
_ = quit() => info!("{BLOOM}")
363+
_ = quit() => info!("Bye!")
375364
}
376365
}
377366

src/binder/copy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::planner::operator::copy_to_file::CopyToFileOperator;
99
use crate::planner::operator::table_scan::TableScanOperator;
1010
use crate::planner::operator::Operator;
1111
use crate::planner::Childrens;
12-
use fnck_sql_serde_macros::ReferenceSerialization;
12+
use kite_sql_serde_macros::ReferenceSerialization;
1313
use serde::{Deserialize, Serialize};
1414
use sqlparser::ast::{CopyOption, CopySource, CopyTarget};
1515

0 commit comments

Comments
 (0)