mirror of
https://github.com/immich-app/immich.git
synced 2025-12-30 01:11:52 +03:00
chore: no sql generation for queries with side effects (#18301)
no sql generation for queries with side effects
This commit is contained in:
@@ -100,50 +100,6 @@ where
|
||||
"sharedWithId" = $1
|
||||
and "sharedById" = $2
|
||||
|
||||
-- PartnerRepository.create
|
||||
insert into
|
||||
"partners" ("sharedWithId", "sharedById")
|
||||
values
|
||||
($1, $2)
|
||||
returning
|
||||
*,
|
||||
(
|
||||
select
|
||||
to_json(obj)
|
||||
from
|
||||
(
|
||||
select
|
||||
"id",
|
||||
"name",
|
||||
"email",
|
||||
"avatarColor",
|
||||
"profileImagePath",
|
||||
"profileChangedAt"
|
||||
from
|
||||
"users" as "sharedBy"
|
||||
where
|
||||
"sharedBy"."id" = "partners"."sharedById"
|
||||
) as obj
|
||||
) as "sharedBy",
|
||||
(
|
||||
select
|
||||
to_json(obj)
|
||||
from
|
||||
(
|
||||
select
|
||||
"id",
|
||||
"name",
|
||||
"email",
|
||||
"avatarColor",
|
||||
"profileImagePath",
|
||||
"profileChangedAt"
|
||||
from
|
||||
"users" as "sharedWith"
|
||||
where
|
||||
"sharedWith"."id" = "partners"."sharedWithId"
|
||||
) as obj
|
||||
) as "sharedWith"
|
||||
|
||||
-- PartnerRepository.update
|
||||
update "partners"
|
||||
set
|
||||
|
||||
Reference in New Issue
Block a user