stax_query ()

Description:

Query a Cassandra database and return the query result as a table sequence.

Syntax:

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

Note:

The external library function performs the query cql over a Cassandra database and returns the query result as a table sequence. The parameter staxClient is the database connection.

Parameters:

staxClient

Database connection handle

cql

The query statement

args

Parameter values; can be omitted

Return value:

A table sequence

Example:

 

A

 

1

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

Create a Cassandra database connection

2

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

Execute query over the Cassandra database

3

=stax_close(A1)