Roberto Duran
Roberto Duran
DTDrizzle Team
Created by bambam22 on 11/26/2023 in #help
Map casing when using sql`` operator
sorry is the syntax is not right... Typing from my phone
61 replies
DTDrizzle Team
Created by bambam22 on 11/26/2023 in #help
Map casing when using sql`` operator
for your query I think the .as is a better option You could build your request like this
db.
select({
userId: sql`${tableName.user_id}`.as("userId")
})
.from(tableName)
db.
select({
userId: sql`${tableName.user_id}`.as("userId")
})
.from(tableName)
61 replies
DTDrizzle Team
Created by bambam22 on 11/26/2023 in #help
Map casing when using sql`` operator
sql`select user_id AS "userId" from users``;
61 replies