How do I convert a CLOB object returned over waterline to a JSON object?

380
April 27, 2017, at 7:56 PM

In DB: I have defined a CLOB column in my table, which is a JSON object that can get quite large.

In Sails App model: I have defined the table and i retrieve it using

MyModel.find({},function (err, found) {
  // The table contents are successfully retrieved into an array, no WLError is returned  
})

Then I tried to convert the array to JSON using

res.send(JSON.stringify(processesData));

Which resulted in the following error

NJS-003:connection invalid

Then I tried iterating over the array copying it into an object, then I realized that the CLOB column object for this does not contain any JSON looking properties, only some informative properties.

The question is... What is the right way to retrieve a CLOB object using sails/watterline ? Is there some kind of a different flow for retrieving->converting to json of CLOB objects? Searched for info on this and could not find any.

READ ALSO
Why does my Firebase request return as 500 (internal server error)?

Why does my Firebase request return as 500 (internal server error)?

I have the following code that does not execute (I get back 500 internal server error)

347
MongoDB Node.JS Driver

MongoDB Node.JS Driver

can anyone share seprate MongoDB connect file ,serverjs file and controller

330
NodeJS Mongoose handle database connection failed exception

NodeJS Mongoose handle database connection failed exception

I'm building a restful web service api using NodeJSIt uses Mongoose as ODM and using MongoDB for backend

416
browser.d.ts dependency for Edge web extension APIs browser.runtime.* in typescript

browser.d.ts dependency for Edge web extension APIs browser.runtime.* in typescript

For chrome extension developed using typescript, we need a definition file called chromed

449