'pgx is not returning rows after I do an insert
Im just doing an insert using the following code, and while i can see the data in the database, pgx is not returning any rows.
rows, err := db.Query(context.Background(), `
INSERT INTO
reservation (room_id, user_id)
VALUES
($1, $2)
`, roomId, userId)
I tried using QueryRow too but same thing, no rows are returned. Can anyone tell me where Im going wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
