I'm trying a query on a postgres database through the loopback api explorer:
{"where": {"archived_at":{ "neq": null }}}
However, I only get results where archived_at is null?
The following query worked for me...
{ "include": [ "currency" ], "where": { "currencyCode": { "neq": null } } }
I was requesting tables that had a currencyCode...
(Sorry for the poor quality of my response, I just wanted to share, even I didn't have a straight answer to the OG's question, and I don't have enough props to comment)
It depends on the database. Based on postgresql in loopback 3.
For search integer / number null or not null value.
I think it depends on the database and loopback version.
You can try like nlike
query in loopback (but how to use it depends on the db) https://loopback.io/doc/en/lb3/Where-filter.html#ilike-and-nilike
Querying not null value
Explorer:
{"where": {"principalId": { "neq": "" }} }
or in server
{where: {"principalId": { neq: "" }} }
Try to direct query in database. Loopback allowed for that.
"angular": "^1.6.3",
"angular-messages": "^1.6.3",
"angular-ui-validate": "^1.2.2",
"async": "^2.1.5",
"bower": "^1.8.0",
"compression": "^1.6.2",
"cors": "^2.8.1",
"helmet": "^3.5.0",
"loopback": "^3.7.0",
"loopback-boot": "^2.23.0",
"loopback-component-explorer": "^4.2.0",
"
loopback-component-storage": "^3.2.0",
"loopback-connector-mongodb": "^3.0.1",
"loopback-connector-mysql": "^3.0.0",
"loopback-connector-postgresql": "^2.8.0",
"loopback-console": "^1.1.0",
"loopback-datasource-juggler": "^3.5.0",
"loopback-sdk-angular-cli": "^3.0.0",
"milligram": "^1.3.0",
"serve-favicon": "^2.4.2",
"strong-error-handler": "^2.0.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With