sql Tagged Template Function

Hi everyone. Please help. Where can find the tagged template function called 'sql' in the code?
8 Replies
Imaginativeone
Is this post active?
Nurul
Nurul2w ago
Hey @Imaginativeone Do you mean you want to find the implementation code of sql function in the prisma repository?
Imaginativeone
@Nurul (Prisma) Thanks for getting back to me. Yes. Somehow, I'm using that function incorrectly (to make a dynamic SQL query) and I'm trying to get to the bottom of using it properly. But yes, I want to find the implementation code of sql function in the prisma repository.
Imaginativeone
GitHub
sql-template-tag/src/index.ts at main · blakeembrey/sql-template-tag
ES2015 tagged template string for preparing SQL statements, works with pg, mysql, and sqlite - blakeembrey/sql-template-tag
Imaginativeone
@Nurul (Prisma) May I DM you? When I use a regular string to call my sql query, it works fine. However, when I try to use that same string within a variable, I get an error. What am I doing wrong? Anyone got any guidance on this? Is it possible to make my own tagged function that works?
RaphaelEtim
RaphaelEtim2w ago
Hi @Imaginativeone, can you share the query and the error message?
Imaginativeone
@RaphaelEtim You bet! Please stand by... @RaphaelEtim May I DM you? I might have some PII in there...
RaphaelEtim
RaphaelEtim2w ago
Yes you can
Want results from more Discord servers?
Add your server