pg icon indicating copy to clipboard operation
pg copied to clipboard

Golang ORM with focus on PostgreSQL features and performance

Results 109 pg issues
Sort by recently updated
recently updated
newest added

When I already have a model in memory and I want to load a relation of that model I do something like this: ```Golang db.Model(&user). Column("_"). WherePK(). Relation("Roles"). Select() ```...

When issuing several queries on the same model, the list representing the "many" side of the relationship gets appended with identical entities. This is undocumented and very surprising since one...

I think I found something undocumented in the Wiki pages and issues. I need this query: ```sql WITH cte AS ( SELECT "player"."id", "player"."created_at", "player"."note" FROM "players" AS "player" ORDER...

Hi, Kindly please advise how would one check if a table (created based on model) would exist. I would like to perform a schema integrity check every time the app...

Having three tables with the following specifications: ``` type Devices struct { ID int Name string } ``` and ``` type Features struct { ID int Name string } ```...

```go type Store struct { Id uuid.UUID `pg:"type:uuid"` User *User UserId uuid.UUID `pg:"type:uuid"` Name string `pg:",unique"` Slug string `pg:",unique"` Invitations []*StoreInvitation BusinessCategories []*BusinessCategory `pg:"many2many:categories_to_stores"` Users []*User `pg:"many2many:users_to_stores"` CreatedAt time.Time }...

Hi, any idea how to do a recursive delete? e..g for ```sql CREATE TABLE domains ( dom_id serial PRIMARY KEY, dom_domain int REFERENCES domains(dom_id), ); ```

I know that this one is a difficult one as stated in #885 But I'd like to present my use case. I have files that can be attached to many...

In the beblow case, the two unique constraints might not be constructed correctly in SQL. ```go type Test struct { tableName struct{} `pg:"tests"` ID int KeyAID int `pg:",unique:g1"` KeyBID int...

I am sure that I am overlooking this completely, but this is for a small project that would be ran on a local machine. I am wanting to use that...