Coder Social home page Coder Social logo

bdqlweb's Introduction

BDQL工具

1.介绍

针对BigChainDB进行SQL查询。网页版可视化查询工具。

2.CentOS安装

2.1 拉取源码

git clone https://github.com/keer123456789/bdqlWeb.git
cd bdqlWeb
git checkout v1.0

如果没有git工具,运行sudo yum install git

2.2 启动项目

如果没有maven工具,运行sudo yum install maven。启动项目,运行下列命令:第一次可能会拉依赖,会慢一些,之后启动就好了。

mvn spring-boot:run

3 开始使用

启动项目,启动完成后,访问:http://127.0.0.1:8080,如图1:

img1

3.1 密钥

图1中的获取密钥按钮失效,在bdqlWeb目录下存放一个keypair.txt文件,里面有一个事先生成好的密钥,打开复制出来,粘贴在图二的红框。

img2

3.2 输入BigchainDB节点的地址

在图3的红框中输入相应BigchainDB节点的地址。默认是本地的BigchainDB节点。 img3

点击连接按钮,会弹出对话框,如图4,连接成功。

img4

3.3 使用Insert语句创建资产。

注意:列名不需要加引号,每列的值需要用引号。

INSERT INTO table_name (column1,column2,column3,...)VALUES (value1,value2,value3,...)

3.4 使用update语句创建资产的metadata。

注意:where后的表达式是固定的。assetID是资产ID。不用引号和0x

UPDATE table_name SET column1=value1,column2=value2,... WHERE ID = assetID;

3.5 使用select 语句查询

注意

  • 不支持多表查询
  • 支持*查询
  • where 支持<,<=,>,>=表达式,其他表达式还不支持。
  • 无论是asset表名还是metadata表名都尽量不要重名
SELECT column_name,column_name FROM table_name where some_column=some_value;

bdqlweb's People

Contributors

keer123456789 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.