Billy Swedish
Billy Swedish
Explore posts from servers
KKysely
Created by Billy Swedish on 11/8/2024 in #help
Trouble with dynamically allocating table name via string
I thought not. We might try with Kysely<any> in later experiments. Ideally we would be able to make a generic select, upate or delete statement that we can use on multiple tables. For now we will live with the same statement for two tables. Will report back when we have tested with your suggestion
5 replies
KKysely
Created by Billy Swedish on 11/6/2024 in #help
Dynamic expression builder using raw SQL for WHERE column LIKE string% OR
@Igal that works great. Leaving the full solution here for others who come looking
const condition = dirPaths.map((dir) =>
sql<boolean>`file_path LIKE ${dir + '%'}`)
.reduce((acc, condition) => sql<boolean>`${acc} OR ${condition}`);
const condition = dirPaths.map((dir) =>
sql<boolean>`file_path LIKE ${dir + '%'}`)
.reduce((acc, condition) => sql<boolean>`${acc} OR ${condition}`);
6 replies
KKysely
Created by Billy Swedish on 11/6/2024 in #help
Dynamic expression builder using raw SQL for WHERE column LIKE string% OR
Ok, I will give that a test and let you know. Thanks for ther quick response!
6 replies
TtRPC
Created by Billy Swedish on 8/4/2024 in #❓-help
tRPC and playing audio files on the frontend
I forgot about the tRPC express hook, I will try it through that and it should keep me in line with a single comms system in the app
4 replies