stax_query()

阅读(594) 标签: 查询, cassandra数据库, 序表,

描述:

查询Cassandra数据库,结果值返回成序表

语法:

stax_query (staxClient, cql, [arg1], [arg2], ...) 

备注:

外部库函数,数据库中查询指定的cql,返回cql的查询结果所组成的序表,其中staxClient为数据库连接。

参数:

staxClient

数据库连接句柄

cql

需要查询的cql语句

args

参数值,可省略

返回值:

序表

示例:

 

A

 

1

=stax_open("127.0.0.1":9042, "mycasdb","cassandra":"cassandra")

Cassandra数据库连接

2

=stax_query(A1,"select * from user where id=?",1)

执行Cassandra数据库查询

3

=stax_close(A1)