Commit d78eb1b8 authored by l2m2's avatar l2m2

upload.

parent 2414c036
......@@ -3,25 +3,14 @@ var _e = require("topsin.error");
var DEMO_CONN = 'DEMO_CONN';
DB.addConnection({
database_type: 'pg',
database_host: '139.196.104.13:5433',
database_name: 'TOPDFM_DEV_V6',
database_user: 'toplinker',
database_pwd: 'TopLinker0510'
database_type: 'mssql',
database_host: '10.90.48.56\\CHN',
database_name: 'DI_Data_Managment',
database_user: 'di',
database_pwd: 'Vkc5d2JHbHVhMlZ5'
}, DEMO_CONN);
var query = DB.query(DEMO_CONN);
query.begin();
try {
var r = query.selectValue('SELECT 1', {});
if (query.lastError().isValid()) {
throw query.lastError().text();
}
print("r: ", r);
query.commit();
} catch (e) {
query.rollback();
print(e);
}
var ok = query.isConnected();
print(ok);
DB.removeConnection(DEMO_CONN);
\ No newline at end of file
var _hocon = require("topsin.hocon");
var str = " a: 'a' ";
var str = 'a: "设置&bar"';
var r = _hocon.parseString(str);
print(JSON.stringify(r));
\ No newline at end of file
str = ' a: "a" ';
r = _hocon.parseString(str);
print(JSON.stringify(r));
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment