/
githubmirror
/
sqlc
Обзор
Документация
Войти
/
githubmirror
/
sqlc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/endtoend/testdata/update_join/mysql/query.sql
23 строки
616 B
Kyle Gray
test(endtoend): Split shema and queries (#2803)
04 окт 2023, 19:13
Не верифицирован
04 окт 2023, 19:13
5664224
Код
Авторство
О чём код?
-- name: UpdateJoin :exec UPDATE join_table as jt JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ?; -- name: UpdateLeftJoin :exec UPDATE join_table as jt LEFT JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ?; -- name: UpdateRightJoin :exec UPDATE join_table as jt RIGHT JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ?;