I need to create an App. We are using PostgreSQL as the underlying DB. The reason we decided on Postgres was because we wanted a relational database due to various entities and their relationships (which did not seem ideal for NoSQL databases like Mongo since there will be multiple joins) and at the same time we wanted to leverage the advantage of array and JSON datatypes of Postgres which is not available in MySQL.
We are using SailsJS framework due to its simplicity, built in sockets.io API and my prior (though very limited) experience with this framework (with MongoDB as underlying DB). It uses waterline as the underlying ORM.
Model.query() is really an awesome feature which allows me to run native SQL queries.
The problem that I am facing is related to defining a model with array datatype of Postgres. By default, if I check in database, the column is changed to text datatype in DB. I need to manipulate array fields using postgre's build in array functions. But for that, I need to be able to create a table with the required type. I need to know how is that possible ?