Dirigible's Logodirigible

Enterprise JavaScript

Description

Enterprise JavaScript is a set of API modules that aims at standardization of the usage of http client and server, database access, files operations, websockets, and even threads and streams manipulations for JavaScript.

For instance:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
	/* globals $ */
	/* eslint-env node, dirigible */

	var database = require('db/database');
	var response = require('net/http/response');

	var datasource = database.getDatasource(); // default
	//var datasource = db.getNamedDatasource("name-of-the-datasource");

	var connection = datasource.getConnection();
	try {
	    var statement = connection.prepareStatement("select * from DGB_FILES where FILE_PATH like ?");
	    var i = 0;
	    statement.setString(++i, "%");
	    var resultSet = statement.executeQuery();
	    while (resultSet.next()) {
	        response.println("[path]: " + resultSet.getString("FILE_PATH"));
	    }
	    resultSet.close();
	    statement.close();
	} catch(e) {
	    console.trace(e);
	    response.println(e.message);
	} finally {
	    connection.close();
	}

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



Project Info

General

Parameter Value
GUID core_api
Author DirigibleLabs
Repository dirigiblelabs/core_api
License Eclipse Public License - v 1.0
Version v0.2-beta
Download v0.2-beta.zip

Dependencies

Dependency Repository
none none