1. SQuirreL Client

SQuirreL is a powerful open source graphical application that you can install on your computer to connect to your LeanXcale instance and write, edit and execute SQL statements, edit the result-sets and much more.

SQuirreL Query table ordered

The SQuirreL SQL client uses JDBC to allow users to explore and interact with databases via a JDBC driver. It provides an editor that offers code completion and syntax highlighting for SQL. SQuirreL is written in Java, so it is multiplatform.

Plugins can be added to modify the application’s functionality.

1.1. Install JDBC driver

You can download the Java JDBC driver (jar with dependencies) for LeanXcale from the Drivers page.

To install the driver, copy the .jar file you downloaded and paste it into the lib directory inside of your SQuirreL install directory. For instance, in Linux you would do:

user@host:~$ cp qe-driver-2.0.0-jar-with-dependencies.jar /home/user/squirrel-sql-4.1.0/lib
  • Open SQuirreL

  • Open the Drivers tab and press the + icon:

active_driver

  • Choose from the list the qe-driver jar that you copied in previous steps and fill the information as in the picture. The important information is:

    • Example URL: jdbc:leanxcale://{server}:{port}

    • Class Name: com.leanxcale.client.Driver

options

  • Click OK and you’ll see that the driver is now correctly configured by looking at the blue mark at the side of the driver name and the green text at the bottom:

active_driver

It’s ready, so you can now set up the connection.

1.2. Setting up the connection

In SQuirreL, database connections are called Alias, so go to the Alias tab and click the + button: Connection example

Fill the required form data:

  • Name: put a name to the connection to your database

  • Driver: the LeanXcale Driver

  • URL: jdbc:leanxcale://{Your server name or IP address}:{Port}{Your database}{;property=value{;property=value}}

  • User Name: the user name of your database

  • Password: the password of your database

The image below shows an example of a connection setting:

Connection example

Take into account that if you have Security enabled in your LeanXcale installation, you must add the property "secure=true" to your URL:

jdbc://leanxcale://54.236.231.17:1529/analyticalGIS;secure=true

REVISAR SEGURIDAD TLS

If you want to test the connection, just click on the Test button and then on Connect. If SQuirreL connected successfully to LeanXcale, you should see the "Connection successful" dialog:

Connection example

Click OK in the Add Alias window and you’re set to go.

1.3. Usage Examples

1.3.1. Connecting to the database

To use the LeanXcale connection you just created, open the Alias tab and double-click over the connection name:

Connecting to the database

Then click the Connect button on the next screen:

Connect to

You’ll see the SQuirreL interface and you can start typing SQL commands:

SQuirreL interface

1.3.2. Creating a table

Change to the SQL tab, write the CREATE TABLE query and press Ctrl+Enter:

SQuirreL Create table

1.3.3. Inserting rows

Change to the SQL tab, write the INSERT query and press Ctrl+Enter:

SQuirreL Insert rows

1.3.4. Listing tables

To see the tables in your schema and its details, go to the Objects tab, open your schema (USER1 in the image) and open the TABLE element of the tree. If you want to see information about a specific table, you can click in the table name (PERSONS in the image) and then in the tabs at the right. In the image, you can see that clicking over Columns gives you the list of columns of the table:

SQuirreL List tables

1.3.5. Querying a table

After clicking over the name of the table that you want to see its data, click on the Content tab to see the content you inserted in the table:

SQuirreL Query table

1.3.6. Querying a table in descendent order

If you want to order the table data you’re viewing, you can click on the name of the column once to order in ascendant order or twice to order it in descendant order:

SQuirreL Query table ordered