Natan Parmigiano
Natan Parmigiano
Explore posts from servers
CDCloudflare Developers
Created by Natan Parmigiano on 10/19/2024 in #pages-help
Wrongfull Phishing Report
In the heat of the moment, i came straight to here and didnt realise that part haha Thanks, will do
3 replies
DTDrizzle Team
Created by Natan Parmigiano on 10/16/2024 in #help
[Solved] Aliasing a column
No description
5 replies
DTDrizzle Team
Created by Natan Parmigiano on 10/16/2024 in #help
[Solved] Aliasing a column
May be used as such in views! It generates views with aliased columns:
CREATE VIEW `test` AS select "users"."id", "sessions"."id" as "session_id" from "users" left join "sessions" on "users"."id" = "sessions"."user_id";
CREATE VIEW `test` AS select "users"."id", "sessions"."id" as "session_id" from "users" left join "sessions" on "users"."id" = "sessions"."user_id";
5 replies
DTDrizzle Team
Created by Natan Parmigiano on 10/16/2024 in #help
[Solved] Aliasing a column
No description
5 replies
DTDrizzle Team
Created by Natan Parmigiano on 10/16/2024 in #help
[Solved] Aliasing a column
I wrote a little generic function that does exactly what i want, for anyone interested:
const aliasedColumn = <T extends SQLiteColumn>(column: T, alias: string) => {
return sql<GetColumnData<T>>`${column}`.as(alias);
};
const aliasedColumn = <T extends SQLiteColumn>(column: T, alias: string) => {
return sql<GetColumnData<T>>`${column}`.as(alias);
};
5 replies