Questions tagged [sails-postgresql]

A Waterline adapter for PostgreSQL. May be used in a Sails app or anything using Waterline for the ORM.

106 questions
2
votes
1 answer

Sails ORM: How to pass value with array in valuesToEscape parameter

I've rawQuery which requires comma separated string but according to the documentation here, the second argument should be an array: An array of dynamic, untrusted strings to SQL-escape and inject within the SQL string using the appropriate…
SpaceX
  • 555
  • 1
  • 6
  • 16
2
votes
2 answers

How can I use PostgreSQL transactions in SailsJs?

My problem is that i have a complex chain of queries and it make rollback if someone of this transactions fail. I've read about transactions in Sails and, for default, Sails don't support transactions because each transaction make a new connection…
alvaropaco
  • 1,573
  • 18
  • 29
2
votes
1 answer

Sails rejecting PostgreSQL connection with sails-postgresql module

I have a sails web app in an intranet environment. An average of ~12 users are logged in at the same time. Eventually I get the classic connection refused message from sails-postgresql that lasts for at least 3 minutes, denying all http requests…
2
votes
1 answer

Is there a way to query multiple tables at the same time in Sails?

I've been tasked with adding an Angular Typeahead search field to a site and the data needs to come from multiple tables. It needs to be a "search all the things" kind of query which looks for people, servers, and applications in one spot. I was…
2
votes
1 answer

SailJs is Deleting Data from pg database

Something strange is happening with my app, I am using SailsJs with official PostgreSQL driver and my data gets deleted. I don't have any pattern or list of specific events which deletes the data but I have following observations. Few days back i…
Naveed Ahmad
  • 314
  • 6
  • 18
2
votes
2 answers

How to get sails to connect to Postgres and return data?

I'm completely new to Node and Postgres and thought I would make my task a little easier by user Sails.js to build out my api for me. But I've search relentlessly for a single tutorial that walks you through all the steps. The official docs just…
user441058
  • 1,188
  • 1
  • 16
  • 32
2
votes
1 answer

How to use bigserial for primary key id with Sails js

I have the following model definition: module.exports = { attributes: { id: { type: 'bigserial', primaryKey: true }, email: { type: 'email', required: true, unique: true } } When I lifed sails, it didn't give me…
JustWonder
  • 2,373
  • 3
  • 25
  • 36
2
votes
1 answer

Getting BYTEA from PostgreSQL in Sails.js

I have a problem in dealing with PostgreSQL BYTEA type in Sails.js. Table definition (yes it is odd to create binary PK, but some_data is always small): CREATE TABLE data_blobs ( some_data BYTEA PRIMARY KEY, my_date_time TIMESTAMP WITH TIME ZONE…
vsenko
  • 1,129
  • 8
  • 20
2
votes
0 answers

Sails.js Huge performance difference between blueprint route and native SQL query

I am using sails version 0.10.5 for a particular project. We are using postgresql as the underlying database which is a few GBs in size. Recently I started noticing a problem. There is a postgres table whose model definition is as…
Mandeep Singh
  • 7,674
  • 19
  • 62
  • 104
2
votes
1 answer

Error using Postgres with Sails.js on Heroku

Thanks in advance for any help. Sails: ~0.10.0 DB: Postgres using sails-postgresql adapter I've successfully deployed my Sails app to Heroku and am able to connect to it in the browser. However, I try to create any data using blueprints or by using…
Jay
  • 231
  • 2
  • 4
  • 9
2
votes
1 answer

Why does my post request to PostgreSQL DB save my UTC DATETIME as a local time

I'm passing an object to my Sails API that has two properties with values of a date-time string(2015-05-12 13:30:00+00") and a time string("7:00 AM") respectively. In my Sails controller I remove the original time from the date-time string, convert…
Brad W
  • 2,540
  • 2
  • 18
  • 28
2
votes
1 answer

sails­postgresql Error while using sails lift command?

While running $ sails lift command , I am getting this error. info: Starting app... error: Trying to use unknown adapter, "sails­postgresql", in model `adminintro`. error: Are you sure that adapter is installed in this Sails app? error: If you…
Niks
  • 87
  • 2
  • 8
2
votes
0 answers

Sailsjs Postgres NULL Raw query

I want to make sure this isn't a user error before creating a bug report Using sails-postgresql adapter I have a query (I've dummied down for purposes of this question) that wants to handle a NULL value, but I get an error no matter how I write the…
Senica Gonzalez
  • 7,996
  • 16
  • 66
  • 108
2
votes
1 answer

Sails fails to return or error on large result set

I am bypassing the ORM and using the Model.query function to query and return a "large" result set from PostgreSQL. The query returns around 2 million rows. When running the query directly from postgres it returns in around 20s. The query fails…
Matt E
  • 457
  • 1
  • 11
  • 24
2
votes
2 answers

SailsJS Schema Name Issue

I am trying to connect my SailsJS app to a postgres db that has another schema aside from 'public' The schema name of the postgres DB that I am connecting to is 'sales' Where am I am going wrong? Thank you! connection: 'postgres', tableName:…
SFielder
  • 21
  • 1