Kneemund
Kneemund
Explore posts from servers
DTDrizzle Team
Created by Kneemund on 10/14/2024 in #help
reusing placeholders
Is it possible to reuse placeholders with the same value instead of passing them to the driver every time they're referenced? Simply giving them the same name doesn't seem work. Drizzle creates a separate SQL parameter for each placeholder regardless. Example This is what Query#params looks like after referencing two placeholders multiple times.
[
Placeholder {
name: "warningTimestamp",
getSQL: [Function: getSQL],
}, Placeholder {
name: "warningTimestamp",
getSQL: [Function: getSQL],
}, Placeholder {
name: "userId",
getSQL: [Function: getSQL],
}, Placeholder {
name: "warningTimestamp",
getSQL: [Function: getSQL],
},
...
]
[
Placeholder {
name: "warningTimestamp",
getSQL: [Function: getSQL],
}, Placeholder {
name: "warningTimestamp",
getSQL: [Function: getSQL],
}, Placeholder {
name: "userId",
getSQL: [Function: getSQL],
}, Placeholder {
name: "warningTimestamp",
getSQL: [Function: getSQL],
},
...
]
1 replies