sql Tagged Template Function

Hi everyone. Please help. Where can find the tagged template function called 'sql' in the code?
8 Replies
Imaginativeone
ImaginativeoneOP3mo ago
Is this post active?
Nurul
Nurul3mo ago
Hey @Imaginativeone Do you mean you want to find the implementation code of sql function in the prisma repository?
Imaginativeone
ImaginativeoneOP3mo ago
@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
ImaginativeoneOP3mo ago
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
ImaginativeoneOP3mo ago
@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
RaphaelEtim3mo ago
Hi @Imaginativeone, can you share the query and the error message?
Imaginativeone
ImaginativeoneOP3mo ago
@RaphaelEtim You bet! Please stand by... @RaphaelEtim May I DM you? I might have some PII in there...
RaphaelEtim
RaphaelEtim3mo ago
Yes you can
Want results from more Discord servers?
Add your server