项目介绍
db3 network 是一款开源去中心化 firebase 实现
v0.2.7 版本主要更新
db3>-$ new-doc --addr 0x997f631fcafeed5ee319c83683ae16e64783602b --collection-name books --documents '{"name": "John Doe","age": 43,"phones": ["+44 1234567","+44 2345678"]}' send add document done with tx +O9cK2cHLexZQvIITk4OTm8SxBhq7Yz7g+xZYiionWo=
从collection中获取文档列表
db3>-$ show-doc --addr 0x22fb51848e26b34e242dd16a1224e8f23ee9b42e --collection-name books id_base64 | owner | document ----------------------------------------------+--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------- AQAAAAAAAAAyAAAAAQAAAAEAAAAAAAAAfAAAAAEAAAAA | 0x84b0bd55e7ad979b7cb92a56f561190de8f68403 | Document({"name": String("John Doe"), "age": Int64(43), "phones": Array([String("+44 1234567"), String("+44 2345678")])}) AQAAAAAAAAAyAAAAAQAAAAEAAAAAAAABLAAAAAEAAAAA | 0x84b0bd55e7ad979b7cb92a56f561190de8f68403 | Document({"name": String("John Doe"), "age": Int64(44), "phones": Array([String("+44 1234567"), String("+44 2345678")])}) AQAAAAAAAAAyAAAAAQAAAAEAAAAAAAABPgAAAAEAAAAA | 0x84b0bd55e7ad979b7cb92a56f561190de8f68403 | Document({"name": String("John Doe"), "age": Int64(45), "phones": Array([String("+44 1234567"), String("+44 2345678")])})
根据文档ID查询文档
db3>-$ get-doc --id AQAAAAAAAAAVAAAAAQAAAAEAAAAAAAAAOQAAAAEAAAAA id_base64 | owner | document ----------------------------------------------+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------- AQAAAAAAAAAVAAAAAQAAAAEAAAAAAAAAOQAAAAEAAAAA | 0x84b0bd55e7ad979b7cb92a56f561190de8f68403 | Document({"name": String("Mike"), "age": Int64(43), "phones": Array([String("+44 1234567"), String("+44 2345678")])})
db3 network 正处于开发过程中,如果你对去中心化数据库感兴趣或者想了解更多,欢迎到加入到 github 社区 ,给 db3 network 点赞支持
还没有评论,来说两句吧...