Skip to content

Getting Started

xuji755 edited this page Oct 9, 2026 · 1 revision

Getting started

Build

A recent stable Rust toolchain is required. The supported minimum is declared by rust-version in Cargo.toml.

git clone https://github.com/xuji755/bicdb.git
cd bicdb
cargo build --release
cargo test --workspace

Initialize and query

./target/release/bicdb init ./demo
./target/release/bicdb sql -p ./demo \
  "CREATE TABLE t (id NUMBER NOT NULL, name VARCHAR2(32))"
./target/release/bicdb sql -p ./demo \
  "INSERT INTO t VALUES (1,'alpha'); INSERT INTO t VALUES (2,'beta')"
./target/release/bicdb sql -p ./demo \
  "CREATE UNIQUE INDEX t_pk ON t (id)"
./target/release/bicdb sql -p ./demo \
  "SELECT id,name FROM t WHERE id >= 1 ORDER BY id"

Run the local service

./target/release/bicdb start -p ./demo
./target/release/bicdb status -p ./demo
./target/release/bicdbcli -p ./demo
./target/release/bicdb stop -p ./demo

The service uses a local control socket. Multiple clients can remain connected, but one instance executor serializes their statements. Direct access is refused while the service owns the instance.

Useful interactive commands

Inside bicdbcli, terminate SQL with ;, use / to run the current buffer again, and use these commands to inspect the database:

SHOW TABLES;
SHOW GRAPHS;
SHOW GRAPH INDEXES ON knowledge;
SHOW FULLTEXT GRAPH INDEXES ON knowledge;

Dictionary tables such as tab$, fs$, ws$ and user$ are exposed through read-only SQL where the current identity permits them. They cannot be changed with DML.

The full command and SQL surface is maintained in the Chinese user manual.

Clone this wiki locally