Skip to main content

All Questions

Tagged with
5,069 questions with no upvoted or accepted answers
11 votes
1 answer
15k views

Sequelize - Cannot add or update a child row: a foreign key constraint fails

I have an issue where I am not able to use a specific object value to create a record. While it executes the insertion command, an error is thrown immediately after the command begins and a record is ...
cphill's user avatar
  • 5,816
10 votes
2 answers
7k views

How to migrate MySql Database to Firestore

I'm searching the best way to migrate my MySql database to Firebase's new Cloud Firestore. What are the steps? I'm trying first of all to convert my tables and relations in my relational db to a ...
michoprogrammer's user avatar
9 votes
1 answer
309 views

How execute a command on each Sequelize connection?

I need to set a Mysql session variable (aurora_replica_read_consistency) on each Sequelize connection for my nodejs application. I can set this session variable with the below code, but I'm pretty ...
ab11's user avatar
  • 20k
9 votes
2 answers
5k views

Create "In Memory Database" in mysql with NodeJs for Jasmine unit testing

I have a ExpressJs application and unit testing with was done using Jasmine. Currently I'm using real database to run unit tests as well. But I want to do unit testing without using the real database. ...
Shyamali's user avatar
  • 339
8 votes
2 answers
514 views

Rows Rotation For Mysql Table Consumer Process in Round Robin

We have automation to login into different websites and perform some operations on website accounts. It is required that only one BOT can login simultaneously into a specific account to avoid ...
Hassan Akram's user avatar
7 votes
1 answer
1k views

Socket.io Chat application Shows EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners()

I am using socket.io and node.js plus mysql for a private chat application and when i use socket.on('example', function(data){...}); It throws such error code here. node) warning: possible ...
Faisal Rocky's user avatar
6 votes
0 answers
3k views

NodeJS - TypeORM cascade insert using QueryBuilder

I'm trying to upsert an object array with a many-to-many relation to a MySQL table(s) using TypeORM query builder. Had to use the builder because repository save doesn't support upserts. Problem is, ...
JohnnyBack's user avatar
6 votes
1 answer
1k views

Sequelize Raw query not returning array for has many

I am trying to use a raw sql query in sequelize and have this code. My table structure is an external_profile that has many connections. const users = await models.sequelize.query("SELECT `...
user3465657's user avatar
6 votes
0 answers
1k views

NodeJS AWS Lambda: Connection lost: The server closed the connection

I have a lambda function deployed on AWS. This lambda function is built on top of NodeJS. This lambda function contains multiple scripts, each of which is triggered by a certain event. Lately, I have ...
Nicolas El Khoury's user avatar
6 votes
0 answers
2k views

How the sequelize deal with session when temporary table used in mysql stored procedure?

We are building an application using nodejs, mysql using sequelize. Sequelize makes development more easy when it comes to deal with database. Nice concept. I need your help in Sequelize. We have gone ...
Shailesh Sakaria's user avatar
6 votes
1 answer
2k views

implementing ABAC in nodejs/react from scratch

I have a project that I need ABAC implemented in. I've been searching the internet for information on how ABAC works specifically from a Nodejs standpoint. I have an understanding of the basic ...
zero's user avatar
  • 3,084
6 votes
0 answers
704 views

TypeORM (MySQL) connection lost event handling

When using TypeORM with MySQL, how do I properly handle situations like db server dies for some reason? I connect to db using createConnection method and able to catch only errors that may occur while ...
tonghae's user avatar
  • 105
6 votes
2 answers
4k views

How to update JSON record in MySQL database using MySQL query in Node.js?

My JSON structure which I'm getting is similar to this question: var data = { type: "binary", choices: [ { choice: "No", answers: 18 }, { choice: "Yes", answers: 11 } ], ...
Ajay Gabani's user avatar
  • 1,178
6 votes
1 answer
283 views

Sails.js : Joins

var obsType = (from lk in db.LookUp join lt in db.LookUpType on lk.LookUpTypeId equals lt.LookupTypeId where ...
subash chandran's user avatar
6 votes
0 answers
500 views

Node JS mysql native drivers - load balancing splitting read/write queries

We have an existing high traffic PHP web app which uses the MySQL Native driver's load balancing facility to split read & write queries between a master and slave database. I'm migrating the API ...
tja-dev's user avatar
  • 61

15 30 50 per page
1
2 3 4 5
338