多彩编程 多彩编程MZPH · CODE BLOG
ARTICLE DETAIL

文章详情

深耕前端与后端开发技术的一线实战笔记与踩坑复盘。

简单测试白鳝(徐戟)先生用deepseek和claude辅助,rust编写的数据库bicdb

简单测试白鳝(徐戟)先生用deepseek和claude辅助,rust编写的数据库bicdb 在微信公众号上看到他用自己的bic-qa知识库AI辅助从设计到实现的一个给AI智能体使用的数据库bicdb。代码仓库https://github.com/xuji755/bicdb从上面拉取源代码保存到/par/bicdb-main目录。启动rust容器rootDESKTOP-59T6U68:/mnt/c/d# docker start rust rust rootDESKTOP-59T6U68:/mnt/c/d# docker exec -it rust bash rootDESKTOP-59T6U68:/# export PATH/par/mold240/bin:$PATH rootDESKTOP-59T6U68:/# cd /par/bicdb-main rootDESKTOP-59T6U68:/par/bicdb-main# cargo build --release -p bicdb-cli info: syncing channel updates for stable-x86_64-unknown-linux-gnu info: latest update on 2026-10-01, rust version 1.99.0 (b940084d7 2026-09-28) info: downloading component cargo ^C rootDESKTOP-59T6U68:/par/bicdb-main# cargo build --release -p bicdb-cli info: syncing channel updates for stable-x86_64-unknown-linux-gnu error: failed to download file errorReqwest(reqwest::Error { kind: Request, url: https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256, source: hyper_util::client::legacy::Error(Connect, ConnectError(dns error, Custom { kind: Uncategorized, error: failed to lookup address information: Temporary failure in name resolution })) }) error: could not download file from https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256 to /usr/local/rustup/tmp/6wy4c8zrgac5ov8__file: error downloading file: error sending request for url (https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256): client error (Connect): dns error: failed to lookup address information: Temporary failure in name resolution: failed to lookup address information: Temporary failure in name resolution执行cargo build --release -p bicdb-cli命令后系统自动开始升级版本而我不想升级简单断网是不行的报错如上。正确的方法是张泽鹏先生教我的如下命令。就可以正常编译了。rootDESKTOP-59T6U68:/par/bicdb-main# rustup override set 1.88.0 info: override toolchain for /par/bicdb-main set to 1.88.0-x86_64-unknown-linux-gnu rootDESKTOP-59T6U68:/par/bicdb-main# cargo build --release -p bicdb-cli Compiling bicdb-workspace v0.1.1 (/par/bicdb-main/crates/workspace) Compiling bicdb-common v0.1.1 (/par/bicdb-main/crates/common) Compiling bicdb-types v0.1.1 (/par/bicdb-main/crates/types) Compiling bicdb-storage v0.1.1 (/par/bicdb-main/crates/storage) Compiling bicdb-wal v0.1.1 (/par/bicdb-main/crates/wal) Compiling bicdb-index v0.1.1 (/par/bicdb-main/crates/index) Compiling bicdb-txn v0.1.1 (/par/bicdb-main/crates/txn) Compiling bicdb-access v0.1.1 (/par/bicdb-main/crates/access) Compiling bicdb-catalog v0.1.1 (/par/bicdb-main/crates/catalog) Compiling bicdb-exec v0.1.1 (/par/bicdb-main/crates/exec) Compiling bicdb-sql v0.1.1 (/par/bicdb-main/crates/sql) Compiling bicdb-cli v0.1.1 (/par/bicdb-main/crates/cli) Finished release profile [optimized] target(s) in 11.94s编译12s就完成了。用README中的几个命令测试都成功了。rootDESKTOP-59T6U68:/par/bicdb-main# ./target/release/bicdb init ./demo已建区./demo 工作区 bicdb001 日志组2下一步 bicdbsql./demoSELECT * FROM trootDESKTOP-59T6U68:/par/bicdb-main# ./target/release/bicdb sql ./demo CREATE TABLE t (id NUMBER NOT NULL, name VARCHAR2(32))CREATETABLEt2列 rootDESKTOP-59T6U68:/par/bicdb-main# ./target/release/bicdb sql ./demo INSERT INTO t VALUES (1, alpha); INSERT INTO t VALUES (2, beta)影响1行 影响1行 rootDESKTOP-59T6U68:/par/bicdb-main# ./target/release/bicdb sql ./demo SELECT id, name FROM t WHERE id 1 ORDER BY id DESC LIMIT 10id|name---------2|beta1|alpha 2行 rootDESKTOP-59T6U68:/par/bicdb-main# ./target/release/bicdb shell ./demobicdb0.1.1—— 实例./demo提交序号4 恢复起点 LSN24592重放0块回滚0个事务续写位25104输入SQL;结尾执行.quit退出.help帮助自己随便输入几个命令有的不支持。bicdbselect1a;错误绑定期不支持无FROM的SELECTbicdb.quit rootDESKTOP-59T6U68:/par/bicdb-main#rootDESKTOP-59T6U68:/par/bicdb-main# ./target/release/bicdb shell ./demobicdb0.1.1—— 实例./demo提交序号4 恢复起点 LSN25104重放0块回滚0个事务续写位25616输入SQL;结尾执行.quit退出.help帮助 bicdb.help;结尾执行多条语句一次执行.quit退出 bicdbINSERTINTOtVALUES(3,name3),(4,name4);影响2行 bicdbcreatetablet1asselect*fromt;错误语法错误字节26..27期望(bicdbcreatetablet1(aint);CREATETABLEt11列 bicdbinsertintot1selectidfromt;错误语法错误字节15..21不支持INSERT … SELECT/DEFAULT VALUESREQ-SQL-006 bicdbselectsum(id)fromt;错误绑定期不支持S3 首版的表达式面不含CASE/COALESCE/函数调用
返回列表