You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ createConnection }=require('firebird');constisFBBlob=(obj)=>{return(obj&&typeofobj==='object'&&'isReadable'inobj&&'inAsyncCall'inobj);};constcon=createConnection();con.connectSync('127.0.0.1/3050:testdb','sysdba','masterkey','');constquery="SELECT AMSIDNR, INFO, GRUND FROM TERMIN WHERE AMSIDNR = ?;";constargs=["ITE000000225314",]constobj=con;// const obj = con.startNewTransactionSync();constresult=obj.prepareSync(query);// result.execInTransSync(obj, ...(args || []));result.execSync(...(args||[]));constres=result.fetchSync('all',true);functiongetData(rows){returnPromise.all(rows.map(asyncrow=>{letkey;for(keyinrow){if(row[key]){constval=row[key];if(isFBBlob(val)){row[key]=awaitnewPromise((resolve,reject)=>{val._readAll((err,bf)=>{if(err){reject(err);}resolve(bf);});});}}}returnrow;}),)}getData(res).then((rows)=>{obj.commitSync();console.log(rows);});
This code runs through just fine. In the sample here, the field INFO is a BLOB_SUBTYPE_TEXT.
As soon as i switch the lines 25 / 26 and 30 / 31 to use a manual created transaction, the code just stops and the process dies without a word.
After some testing i can say that the code crashes as soon as FBBlob._openSync() (index.js#L105 in this repo) is called - the same when trying to use the stream class (index.js#L162).
Is there (again #115 ) a method / parameter i missed or is this a limitation at any point?
The text was updated successfully, but these errors were encountered:
Following Code:
This code runs through just fine. In the sample here, the field
INFO
is aBLOB_SUBTYPE_TEXT
.As soon as i switch the lines 25 / 26 and 30 / 31 to use a manual created transaction, the code just stops and the process dies without a word.
After some testing i can say that the code crashes as soon as
FBBlob._openSync()
(index.js#L105 in this repo) is called - the same when trying to use the stream class (index.js#L162).Is there (again #115 ) a method / parameter i missed or is this a limitation at any point?
The text was updated successfully, but these errors were encountered: