sqlx::FromRow、rename に一括でプレフィックス付ける機能とかないか?
Conversation
Notices
-
Embed this notice
モミアゲ・ノバシタガール (kb10uy@mstdn.maud.io)'s status on Sunday, 02-Jul-2023 13:57:39 JST モミアゲ・ノバシタガール
- らりお・ザ・何らかの🈗然㊌ソムリエ repeated this.
-
Embed this notice
モミアゲ・ノバシタガール (kb10uy@mstdn.maud.io)'s status on Sunday, 02-Jul-2023 13:57:39 JST モミアゲ・ノバシタガール
INNER JOIN するときに例えば
posts.title AS posts_title,
posts.text AS posts_text,
user.name AS users_name
みたいにして (Post, User) にうまいこと転送したいわけだが、素朴にやると全フィールドに rename を入れる必要がある