Skip to content

Commit

Permalink
docs: add psql
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Feb 3, 2024
1 parent 1c8a4e4 commit 506c991
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 27 deletions.
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,19 @@ FnckSQL individual developers independently implemented LSM KV-based SQL DBMS ou
Welcome to our WebSite, Power By FnckSQL: **http://www.kipdata.site/**

### Quick Started
Tips: Install rust toolchain first.

Clone the repository
``` shell
git clone https://github.com/KipData/FnckSQL.git
```

Install rust toolchain first.
```
cargo run
```
Example
```sql
create table blog (id int primary key, title varchar unique);

insert into blog (id, title) values (0, 'FnckSQL'), (1, 'KipDB');

update blog set title = 'KipData' where id = 2;

select * from blog order by title desc nulls first

select count(distinct id) from blog;

delete from blog where title like 'Kip%';

truncate table blog;

drop table blog;
```
![start](./static/images/start.gif)
then use `psql` to enter sql
![pg](./static/images/pg.gif)
Using FnckSQL in code
```rust
let fnck_sql = Database::with_kipdb("./data").await?;

let tupes = db.run("select * from t1").await?;
let tupes = fnck_sql.run("select * from t1").await?;
```
Storage Support:
- KipDB
Expand Down
3 changes: 2 additions & 1 deletion src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ async fn main() {

let args = Args::parse();
info!("{} \nVersion: {}\n", BANNER, env!("CARGO_PKG_VERSION"));
info!(":) Welcome to the FnckSQL🖕\n");
info!(":) Welcome to the FnckSQL🖕");
info!("Listen on port {}", args.port);
info!("Tips🔞: ");
info!(
"1. all data is in the \'{}\' folder in the directory where the application is run",
Expand Down
2 changes: 1 addition & 1 deletion src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ mod test {

println!("full join:");
let tuples_full_join = fnck_sql
.run_on_query("select * from t1 full join t2 on a = c", query_execute)
.run_on_query("select * from t1 full join t2 on b = c", query_execute)
.await?;
println!("{}", create_table(&tuples_full_join));
results.push(tuples_full_join);
Expand Down
Binary file removed static/images/architecture.png
Binary file not shown.
Binary file removed static/images/demo.png
Binary file not shown.
Binary file added static/images/pg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/start.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 506c991

Please sign in to comment.