A Waterline adapter for PostgreSQL. May be used in a Sails app or anything using Waterline for the ORM.
Questions tagged [sails-postgresql]
106 questions
2
votes
1 answer
Difference between "execute" and "statement" in postgres logs in transaction context
I am getting "WARNING: There is no transaction in progress" error as explained here. When I checked out the logs, I saw that my sails waterline ORM is causing "statement" word to appear on the logs if I use its Model.query method and "execute" word…

Nihat
- 3,055
- 3
- 18
- 28
2
votes
0 answers
Sails/Waterline model attributes not reflected in table
I am trying to create a model using Waterline ORM & sails.js for a postgresql db.
I have a model defined like this.
var Waterline = require('waterline');
var Item = Waterline.Collection.extend({
identity: 'item',
connection:…

Suh
- 23
- 3
1
vote
0 answers
How to change schema name of model at runtime
I'm using sails.js with auto rest activated at config. And using sails-postgresql adapter.
I need to change the default "public" schema after the user login, to another schema, ex: "user_schema".
I tried to change model.meta.schema_name, but it…

Armando Gutheil
- 21
- 2
1
vote
0 answers
Sails Orm Hook Timeout/not connecting to postgres database on AWS EC2
I am currently preparing to put my web application for production. I'm using an Amazon EC2 on Redhat and have a Postgres AWS RDS in the same VPC. I cant seem to connect to the database or to a local one running on the same EC2. I have had no issues…

KevinAvimesa
- 11
- 1
1
vote
0 answers
How to save the return value from the query in Sails.js Console?
I am trying to run a simple query in my local Postgres db to return the User with an ID of 1 and save that value in the variable record. I'm using Sails.js and am in the Sails Console when I'm running these commands. I can get the query to print the…

Joseph Gill
- 1,067
- 11
- 18
1
vote
0 answers
SailsJS : filter find to show only ressources owned by the authenticated user
I'm new in backend development with Sails, I'd like to know how I can prevent users to list ressources they do not own, here are my models :
models/User.js :
var bcrypt = require('bcryptjs')
module.exports = {
attributes: {
// …

a-coruble
- 411
- 4
- 15
1
vote
1 answer
How to insert an array using sails waterline into a postgresql table?
I want to insert an array of strings in one column of a postgresql table using waterline ORM of sailsjs.
I have tried making the model Users.js like this :
interest:{
type: 'string',
required: false,
columnType: 'array'
}
The…

Rajan Sharma
- 2,211
- 3
- 21
- 33
1
vote
1 answer
Sails Waterline Model - attribute parsed as string for postgres bigint column
I am using Sails alongside its Waterline ORM for PostgreSQL. I am having an issue with the defaultsTo parameter in model attribute definition.
Here is a part of my Model definition:
module.exports = {
tableName: 'table',
attributes: {
…

benomite
- 848
- 7
- 23
1
vote
0 answers
Adding models to an existing sailsjs application using postgres
I've got a very strange issue that I'd like some advice on. I have an existing, well-established sails app using Sails 1.0.2 (originally created using 0.13 and upgraded), sails-postgresql@1.0.0-13. For quite a while now, the app has had 9 models…

Patrick Narkinsky
- 33
- 4
1
vote
3 answers
how to implement permissions on routes and functions in sails.js?
I'm new in sails and I have a PostgreSQL database. I want to implement a user management. I have some users, each user can be assigned to multiple groups, each group can be assigned to multiple roles and each role can have some permissions! I…

fariba.j
- 1,737
- 7
- 23
- 42
1
vote
1 answer
sails Sorry, this function doesn't know how to handle {...} callbacks
Somehow, my sails.js 1.x environment has gotten mangled to the point that I'm no longer able to do native queries to my PostgreSQL database. I'm sure the issue is the version of some package or another, because I did some experimentation with…

Patrick Narkinsky
- 33
- 4
1
vote
0 answers
Postgres ltree support using sails.js
I am trying to use sails.js to build a project and am having trouble, I want to patch the "types" that get passed to the waterline postgres adapter so I can use the postgres type.
I have a fork of the current postgres adapter, and when I change…

Carson Wright
- 323
- 3
- 12
1
vote
1 answer
Sails js, how do we write inner join using populate
Sails's populate works as Left join. I want to do as inner join,
Anybody help me how we can write inner join using populate without writing raw query. I am using MYSQL adapter.

Muthukumar Marichamy
- 1,175
- 1
- 17
- 39
1
vote
0 answers
Sails and Waterline: Include attributes from join table in through association
I am trying to model a network of people using Sails.js and the ORM framework, Waterline.
I have a Person model which has many People through a Relation object. I need a way to include the classification attribute from the Relation join model. I…

AesaK247
- 51
- 1
- 5
1
vote
1 answer
SailsJs - Joining multiple models with criteria on all joined models
Below is my data model,
School:
SchoolID
Name
Status
Game:
SchoolID
GameID
Name
Status
Participants:
SchoolID
GameID
StudentID
Name
Status
I want to show "Participants" based on "Status" of "Participants", "School" and "Game". Is it…

Raisudeen
- 11
- 2