MongoDB query where array length is greater than ‘n’
While working on any project where we may have a requirement to check the size of an array or to get an element whose size is greater or less than…
While working on any project where we may have a requirement to check the size of an array or to get an element whose size is greater or less than…
Some time while performing any operation on user like updating user, dropping user or granting or revoking access, we face error like user not found for particular db. Few thing…
dropdb destroys an existing PostgreSQL database. The user who executes this command must be a database superuser or the owner of the database. dropdb is a wrapper around the SQL command DROP DATABASE. There is no effective…
In the Postgres command line, it always prompts a password if the password is not set. We can avoid this in the following way. Before running any Postgres command-line command…
Many time we want run query with in query to get desirable result. MongoDB provide a aggregation operator to achieve result like this. Lets assume we have a collection with…
If we want SQL like "Like" operator in Mongo DB for string matching. But in mongo DB there is no such "like" operator instead it has regular expression to achieve…
There are various way to get year and month from date in PostgreSQL. 1. Extract The extract function retrieves subfields such as year or hour from date/time values. source must be a value expression…
Loopback does not support group by or distinct query. But we can achieve in loopback another way. Let see a solution for this issue. 1. Distinct // Let User is…