Database query
This feature helps administrators access database data easily and quickly without a third-party database client.
Allowed types:
| Type | Description | List | Export |
|---|---|---|---|
| JDBC | SQL queries supported by the configured database. | When chosen, a list of available tables is shown. | Yes. |
| Hibernate | Neutral database queries based on Hibernate query format. | No. |
Execute JDBC query
Section titled “Execute JDBC query”- On the bottom right choose type JDBC.
- Write some valid SQL.
- Click the Execute button.
- Optionally, the results can be exported to SQL or CSV
- Click on
Export to SQL icon. - Click on
Export to CSV icon.
- Click on
Example:
// nodeBase = documents + folders + mails + recordsSELECT count(*) from OKM_NODE_BASE;SELECT count(*) from OKM_NODE_DOCUMENT;SELECT count(*) from OKM_NODE_FOLDER;SELECT count(*) from OKM_NODE_MAIL;SELECT count(*) from OKM_NODE_RECORD;
// select first 10 recordsSELECT * from OKM_NODE_BASE LIMIT 10;SELECT * from OKM_NODE_DOCUMENT LIMIT 10;SELECT * from OKM_NODE_DOCUMENT_VERSION LIMIT 10;SELECT * from OKM_NODE_FOLDER LIMIT 10;SELECT * from OKM_NODE_MAIL LIMIT 10;SELECT * from OKM_NODE_RECORD LIMIT 10;Execute Hibernate query
Section titled “Execute Hibernate query”- On the bottom right choose type Hibernate.
- Write some valid HQL.
- Optionally you can check the “Show SQL” option.
- Click the Execute button.
Example:
select count(*) from NodeBase;select count(*) from NodeFolder;Allowed sentences
Section titled “Allowed sentences”- On the bottom right choose a valid SQL file.
- Click the Import SQL script button.