PrismaP
Prisma16mo ago
3 replies
pppaaattt

Typed SQL Queries for nested prisma/sql directories

Hello I am considering the new Typed SQL feature and building some modular, scalable file structure for my queries. Something like:

prisma/sql/
├── admin/
│   ├── chats/
│   ├── users/
│   └── ...
├── users/
├── chats/
├── messages/
└── ...


Is there a mechanism for this yet? Might it be in scope?

Should I consider instead, or in the meantime a flat structure? Such as the following:

prisma/sql/
├── adminChatsList.sql
├── adminChatsGetById.sql
├── adminUsersList.sql
├── adminUsersGetById.sql
├── adminUsersUpdate.sql
├── chatsList.sql
├── chatsGetById.sql
├── usersProfile.sql
└── ...


This is a cool feature and a data engineer who hasn't worked with TS before can contribute now to our project app. Keep up the good work!
Was this page helpful?