Guide - aamadeo27/vsqle GitHub Wiki
In the configuration menu it's specified the information necessary to connect to a VoltDB node
- Use Local Time: It shows dates using the local timezone, otherwise it'll display dates in GMT-0.
- Enable debug logging : To log debug messages in the console.
- Connections: A list of connections, where a connection defines a set of nodes that will use to start a connection to VoltDB.
To log in a server you have to choose a Connection and provide the user/password. Every time a connection to the database is made, the schema in the editor is reloaded.
A Project can be created to save folders and files related to it. This data is stored in the localStorage of the browser.
Creates a new source folder
Deletes the selected object (file or a folder ).
Renames the selected object (file or a folder ).
Download a Project
Upload a Project
Opens configuration window
Reloads schema
Execute SQL, executes the tab content or if there's a selection, executes only the selection. Shortcut: F5. Similarly F4 executes the query from the cursor's line to the next ";" or EOF. Example
select * from table_a ;
select * from table_b ; select * from table_c ;
select * from table_d
Asuming the cursor is on 2:5 select * from table_b
then F4 executes the query on table_b
, if it's on 2:40 it'll execute the query on table_c
, if it's on 3:1 it'll execute select * from table_d
.
Saves the tab content to a File. This file is stored in the browser's localStorage.
Reloads the opened file.
Download the tab as a sql file.
Upload a file into a new tab.
Opens variable window.
Variables can be used in any tab using the syntax ${variableName}.
For example if we have a variable var
defined to 'crab'
, Then we could run select * from animals where name = ${var}
and that will run as select * from animals where name = 'crab'
A stored procedure can be invoked using the "exec" command in the form of :
exec <StoredProcedureName> <arg1> <arg2> ... <argN>
Type | Example |
---|---|
String | 'string-content' |
Integer | 123456I |
Long | 123456L |
Float | 123.456F |
Double | 123.456D |
Timestamp | '2014-02-01 10:50:57'T |
The select queries by default are specified with "limit 7", so the entire table isn't brought back from the query. In the header of the result are buttons to load the next 7 rows and the rest of the rows.
There's also the option to download the result in CSV, XLS or SQL(insert) formats. Also the result can be copied to a new tab in SQL format or a VoltTableJSON format to a variable that can be used in the invocation of a store procedure*.
*Not currently implemented.
It's possible to parse and summarize the information returned of the Stored Procedure @Statistics, using the command analyze <StoredProcedureName>
that will summarize the information related to that stored procedure. Divided in per node, per partition, per statement statistics, and general statistics.