How can we help?

You are here:
< Back

JDBC in Wallboard

 

Java Database Connectivity, or JDBC for short, is an API for the Java programming language that allows database access. JDBC defines the classes and methods required to query and modify databases. Adapts to the relational data model.

If you want to use JDBC in our system, you should need to know some basic JPQL syntax. (Like [SELECT…], [WHERE…], [GROUP BY…], [ORDER BY…]..etc). We will show some examples of this later.

Where you can find

Administrator→JDBC drivers

How to add JDBC drivers

Here you can add new drivers with the button.

There you can give your JDBC driver a Name (like “Test JDBC”).
You need to give the Driver class name, which you can find mostly where you download the driver.
Lastly, you need to pick your .jar file. (example)

After all these steps, your JDBC driver is ready to use.

How to use it as Datasource

You can create a datasource for it and it will give you back your query result as JSON.
(If you didn’t use datasource before click here.)

You need to fill the URL with URL Connection String.
You need to set the Type to JDBC.
Fill JDBC user name, JDBC password fields with the correct credentials.
In the end, you need to define a query in the JDBC query field.

Here are some examples:

SELECT t
  FROM table t

SELECT t
  FROM table t
  WHERE t.id = 2

SELECT t
  FROM table t
  WHERE t.id = 2
  GROUP BY id

SELECT t
  FROM table t
  WHERE t.id = 2
  GROUP BY id
  ORDER BY id DESC

 

After all these steps, your JDBC datasource is ready to use.