Skip to main content

All Questions

Tagged with
1 vote
1 answer
230 views

golang/pq : "pq: function uniq(integer[]) does not exist"

Here's my code (works fine with gin) query :=` UPDATE posts SET liked_by = uniq(array_append(liked_by, $1)) WHERE id = $2 RETURNING liked_by` return p.DB.Exec(query, userID, post.ID) The error I'm ...
user avatar
1 vote
1 answer
434 views

Swap elements in a MongoDB array given only their ids (in-place)

I read some threads about it, such as this one and that one, but they both come with major flaws & caveats (to me at least). What I want is simple! An update query that: swaps 2 elements in an ...
Tal Kohavy's user avatar
0 votes
1 answer
50 views

MongoDB, update an existing collection via aggregate

I have following mongodb collection { "_id" : "B0006ZPB0S", "title" : "Pretty Diamond-cut Black Hills Gold & Sterling Silver Rose Bud Women's Ring&...
Bubi's user avatar
  • 1
1 vote
0 answers
22 views

Inserting a sub-menu that updates records within a main menu

I am trying to make an Insert or Update menu option in my Main Menu, that can update the Quiz Scores (qz1,qz2,qz3) of any student on the array. However, I am getting stuck at displaying after ...
Jazzy Jeffie's user avatar
0 votes
2 answers
324 views

adding array data from a file to an existing array using jq

I am generating a JSON file (input.json) that looks like this: [ { "name": "MINIMUM_NOTICE_PERIOD", "value": "3" }, { "name": "...
user avatar
0 votes
1 answer
2k views

Update Query: Snowflake table variant column

I am still learning Snowflake, any help would be really appreciated I have a table(tbl1) that has a variant column(column_json) which looks like below: { "catalog": [ { "...
PB384's user avatar
  • 5
0 votes
1 answer
957 views

Problems with "updateMany" and "$pull" on array properties

I have the following object in my mongodb: { "item": { "id": "/Ed/6wigZ9LTLs2mPDWDzOFD/he0vbUEvQBl2Bga/T8=", "status": { "likes": [ ...
user826955's user avatar
  • 3,174
0 votes
1 answer
186 views

laravel array update multiple rows with diffrent ids

i am stuck in when i update multiple array value then each time update same value in diffrent ids like i have three fields like email,alert_level and select in select dropdoewn depends on alert_level ...
Vandan Makwana's user avatar
2 votes
3 answers
3k views

How can I accessed upsertedId when using updateOne in MongoDB

I have new data that I want to insert in my array of blog (My collection look like this - shown below):- { _id: 0, // other vars here..., blog: [ { _id: 0, ...
lala's user avatar
  • 1,409
0 votes
1 answer
25 views

How to update the details in an array on post in MongoDB?

Although its printing the 'success' in console but i am unable to see the changes after clicking on post update. User.update( { email:req.user.email }, { $set: { "Addtasks.$[].topic":...
Vikas Yadav's user avatar
0 votes
1 answer
1k views

Update or Insert new data in nested array MongoDB

I'm using Node JS with Mongoose fyi. Given I've something like this:- let people = [ { "_id": 1, "name": "Person 1", "pets": [ { "_id": 1, ...
lala's user avatar
  • 1,409
0 votes
0 answers
70 views

PHP new strings update in DB with unshift?

I have a problem to adding more strings in my database. The idea is: SELECT information, then added array together, after these UPDATE to database. These are in one code, but UPDATE not working with ...
Slyrfecso's user avatar
0 votes
1 answer
33 views

Inserting a new object into nested array

I have a document in mongodb as follows: { "_id" : 1, "name" : "Christine Franklin", "degrees" : [ { "level" : "Master", info:[ {"major" : "Biology", "...
Karanam Krishna's user avatar
0 votes
1 answer
2k views

javascript array of objects update by uuid

Hi maybe I'm block headed or just tired: But i can't find an easy solution to update / manipulate an object array. (without several loops) I'm getting (via a Listener callback every second) status ...
mhoff's user avatar
  • 611
0 votes
1 answer
42 views

mysqli_query insert and update within array not working

Hey everyone I am trying to run two insert statements and than finally run an update statement within a php array but it seems not to be working correctly. I realize this code has some problems for ...
user avatar

15 30 50 per page