db icon indicating copy to clipboard operation
db copied to clipboard

Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

Results 131 db issues
Sort by recently updated
recently updated
newest added

Noticed a data race on `collection` when upper writes to the `*collection.errors` field after `sess.PrimaryKeys()` returns an error. In this particular case it was a the adapter session returning an...

bug
unconfirmed

If we had type for each DB error instead of variable instance (https://github.com/upper/db/blob/96bcc81a2d529a2df50378a7a35fd9cf8b59865a/error.go#L29-L53), we could store the actual message coming form the database inside of the error. This can be...

v4

https://www.postgresql.org/docs/current/sql-insert.html I'm looking to write a query like; ``` INSERT INTO table ("col", "col2", "col3") VALUES ($1, $2, $3), ($2, $1, NULL) ON CONFLICT("col") DO NOTHING RETURNING col; ``` It...

I don't know if this is the correct place to ask this, but I'm clueless on how to achieve this. I've got the following code ```go package app type FooService...

How to get number of affected rows after calling `Update(...)`? Consider this code: ``` cond := db.Cond{"id": p.ID, "updated_at": oldUpdateAt} found := products.Find(cond) if found != nil { err :=...

enhancement

```sql SELECT count(DISTINCT "archive"."uid" ) FROM "argo_archived_workflows" AS "archive" JOIN "argo_archived_workflows_labels" AS "archive_labels" ON(archive.uid= archive_labels.uid) WHERE("archive" . "namespace"= "ns") ``` How to express complicated count sql using db.v3 ? I...

I am facing a problem where my application get stuck during the DB access, unfortunately I don't have the trace to share, but from my application logs I can see...

The idea behind preloading is being able to map results from a join into an embedded type with ease: ```go artistCollection := sess.Collection("artist") publicationCollection := sess.Collection("publication") type artistAssoc struct {...

proposal
wip

Because I want only the fields that are in my model (which my own representation of some joined tables) I don't want to use * because I don't want the...

Make secureable mode, where syscals is disabled like in google playground