question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push method is not generated for scalar array fields - CockroachDB

See original GitHub issue

Problem

Current push functionality doesn’t allow pushing multiple items. Both databases (postgres and mongo) support pushing multiple items.

Suggested solution

A concat function or being able to pushing multiple items using the current push function.

Alternatives

For MongoDB you can use $runCommandRaw and on Postgresql you can just concat arrays and set it to field.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
FKLCcommented, Jun 23, 2022

I generated client using provider = "postgres" while using cockroachdb and pushing worked. But the method is not generated when provider = "cockroachdb". SQL Query engine handles appending item(s) for both cockroachdb and postgres. The problem is most likely on the client generation side.

0reactions
RobertCraigiecommented, Dec 3, 2022

I can confirm that this is supported by the underlying query engine. The push operation works when provider is set to postgresql.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with scalar lists/arrays (Concepts) - Prisma
How to read, write, and filter by scalar lists / arrays. ... Example field value: ... Use the push method to add a...
Read more >
Troubleshoot Statement Behavior | CockroachDB Docs
Learn how to troubleshoot issues with specific SQL statements with CockroachDB.
Read more >
ARRAY | CockroachDB Docs
The ARRAY data type stores one-dimensional, 1-indexed, homogeneous arrays of any non-array ... CockroachDB supports indexing array columns with GIN indexes.
Read more >
Transaction Layer | CockroachDB Docs
The transaction layer of CockroachDB's architecture implements support for ACID transactions by coordinating concurrent operations.
Read more >
What's New in v21.2 | CockroachDB Docs
This allows a single logging configuration file to service an array of sinks without ... It also does not log a "descriptor not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found