Documentation > Deployment > Command-line Terminal

H-Store Command-line Terminal
H-Store includes a console interface for executing ad hoc queries and stored procedures in a running DBMS cluster. The terminal supports a local history of previously executed commands, auto-reconnect, and tab completion.

Connecting with Terminal

The example terminal below shows how to use the H-Store terminal. Invoke the hstore tool include in the source code repository to connect to an running cluster. You must pass in either the same name of the benchmark used when starting the cluster or the path to the cluster configuration.

Using the project name:

hstore tpcc

Using the path to project jar:

hstore /path/to/tpcc.jar

The client will connect to a random host in the cluster and print a confirmation message. To exit the terminal and disconnect from the cluster, use CRTL+D.

Executing Ad Hoc SQL

Any SQL command entered into the terminal will be sent to the DBMS as a @AdHoc system stored procedure invocation.

For example, to retrieve the number of rows in the ITEM table, you can execute the following SQL statement:

Server Response: OK
 cols[1] (C1:BIGINT), 
 row count: 1
 rows -

Executing Stored Procedure

To be written…