Reading fields of type BLOB with node-firebird

0

I would like help finding a way to read a field of type BLOB as a string using the "node-firebird" module of npm, below the code and problems that I can not handle alone.

db.query(query, parameters,function (error, result) {
    if (error)
        reject({
            ok: false,
            status: 500,
            message: error.message
        });

        console.log(result);

        result[0].TEXTO_EDITAL(function (err, name, e) {                 
            if (err)
                console.log(err);

            e.on('data', function (chunk) {
                console.log('ta ok');
            });

            e.on('end', function () {
                console.log('adeus');
            });
        });

        resolve({
            ok: true,
            status: 200,
            content: result
        });

        db.detach();
});

The console output and error respectively are as follows:

[ { ID_PROCESSO: '00562007', TEXTO_EDITAL: [Function] } ]

Error: invalid BLOB ID
at doCallback (C:\Users\lucas\Documents\NodeProjects\DbConversorService\node_modules\node-firebird\lib\index.js:1234:18)
at C:\Users\lucas\Documents\NodeProjects\DbConversorService\node_modules\node-firebird\lib\index.js:2929:21
at C:\Users\lucas\Documents\NodeProjects\DbConversorService\node_modules\node-firebird\lib\messages.js:151:25
at search (C:\Users\lucas\Documents\NodeProjects\DbConversorService\node_modules\node-firebird\lib\messages.js:117:13)
at C:\Users\lucas\Documents\NodeProjects\DbConversorService\node_modules\node-firebird\lib\messages.js:54:21
at FSReqWrap.wrapper [as oncomplete] (fs.js:460:17)
    
asked by anonymous 12.12.2018 / 19:26

0 answers