Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (24 sloc) 718 Bytes
layout title icon group
samples
Database Query
fa-caret-right
simple

{{ page.title }}

Steps

  1. Create a project database_project.
  2. Then create a JavaScript service named database_query.js.
  3. Within the service code, enter the following content:

Log Levels

var query = require('db/v3/query');
var response = require('http/v3/response');

var sql = "SELECT * FROM DIRIGIBLE_EXTENSIONS WHERE EXTENSION_EXTENSIONPOINT_NAME = ?";
var resultset = query.execute(sql, ['ide-view']);

response.println('<pre>' + JSON.stringify(resultset, null, 2) + '</pre>');

response.flush();
response.close();

For more information, see the API documentation.