feathers-objection icon indicating copy to clipboard operation
feathers-objection copied to clipboard

Can a select statement be constructed using "raw"?

Open sokulski opened this issue 1 year ago • 0 comments

I have the following line in a request on a system that has been out of use for about 14 months. In the ensuing time MariaDB was updated and tests were performed, but this system was not tested as it was not operational at the time.

The offending line is in the request is:

$select: [this.raw('*, (capacity_remaining / capacity) as "capacity_remaining_percentage"')],

The query is failing because the select query cannot be parsed by _selectQuery. The error is item.match is not a function which points me towards the item not being a string as expected.

Is there another means of constructing a raw select statement for a query in Feathers Objection?

sokulski avatar May 27 '23 00:05 sokulski