im使用节点notifyix模块,可在此处https://github.com/nukedzn/node-informix中找到, 下面是我的示例代码,
let opts = {
database : "sampling@myserver",
username : "informix",
password : "xxxxxxx"
}
let informix = require("informix")(opts)
let create_table = CREATE RAW TABLE IF NOT EXISTS dumb (test_id SERIAL,age INT,value BSON);
let inservalues = INSERT INTO dumb(test_id,age,value) VALUES (0, 50, '{math:"80"}'::JSON);
let select_table = SELECT value::JSON FROM dumb;
informix
.query(select_table)
.then(cursor => cursor.fetchAll( { close : true } ))
.then(result => {
console.log(result);
})
无法从bson数据类型中获取价值
error : Segmentation fault (core dumped),
我运行查询时
SELECT value::JSON FROM dumb;
在dbaccess中,我得到了
(expression) {"math":"80"}
你知道这里发生了什么吗? 谢谢