Skip to content

Commit c2a7735

Browse files
committed
improve info's on queries
1 parent dbd3e94 commit c2a7735

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

db/queries/houses.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WHERE id = $5 AND version = $6;
1414
SELECT id,location, block, partition , Occupied, version FROM house WHERE id = $1;
1515

1616
-- name: GetHouseByIdWithTenant :one
17-
SELECT h.id,h.location, h.block, h.partition , h.Occupied, t.name, t.id AS tenant_id
17+
SELECT h.id AS house_id,h.location, h.block, h.partition , h.Occupied, t.name, t.id AS tenant_id
1818
FROM house h
1919
Join tenant t ON h.id = t.house_id
2020
WHERE h.id = $1;

db/queries/tenants.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SELECT * FROM tenant
88
WHERE id = $1;
99

1010
-- name: GetTenantByIdWithHouse :one
11-
SELECT t.id, t.name, t.house_id,h.location, h.block, h.partition,
11+
SELECT t.id AS tenant_id, t.name, t.house_id,h.location, h.block, h.partition,
1212
t.phone, t.personal_id_type,t.personal_id, t.active, t.sos, t.eos, t.version
1313
FROM tenant t
1414
JOIN house h ON t.house_id = h.id

db/sqlc/houses.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/sqlc/tenants.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)