i am still new in node js, and i am trying to make some backend with file upload/ image upload function that can be stored in sql, i am trying using multer but it cant read my file while testing ...
databaseanswers.net Latest Questions
I am using Prisma ORM with PostgreSQL backend for my database, I have users as students and admins and they have slightly different fields so I created a base model User for common info as well as two more models ...
I wanted to seek with sequelize-typescript using NestJS. Problem: I am trying to retrieve all the children recursively, like category table has sub category, sub sub category to an infinite level using parent id. What I have done so far, is trying ...
I have following data in my mongodb database , how can I write a mongoose query to select a particular object from "cartItems" which is a array of objects and update its "qty" and "price" filed. Here’s the data:- { ...
I’m creating a MySQL database and I want to insert about 1000 records that are structured in a JSON array This is the JSON array that I’m importing: [ { "DESCRIPTION": "انفرتر 1 حصان أحادي", ...
I use knex to connect to a postgres db. I have following problem: After my application starts, the very first query takes much longer than the subsequent ones. This can be 4-6 times longer. I suppose the reason for this ...
I have been new to MongoDB and I am trying to connect mongodb using nodejs application. whenever i try to run the nodejs file an error is being raised. MongoError: Unsupported OP_QUERY command: insert. The client driver may require an ...
Summary I have a schema file I use to set up my database and a seed file I use to populate it with some starter data. I’m running them in MySQL ...
I am trying to understand this PostgreSQL deriver but not understand. Please help me:) JSON DATA: { "status_code" : 200, "data" : [ {"user_id":1,"name":"John","age":28} ] } PostgreSQL table is: CREATE TABLE IF NOT EXISTS public.user_table ( user_id numeric(10,0) NOT NULL, name character varying(50) COLLATE pg_catalog."default" ...
I need to migrate some data to my local mongodb database. so I created a seed function to save data to database from a CSV file. In my schema object I specify "members" field as Types.ObjectId[]. But instead it saves ...