John
John
DTDrizzle Team
Created by John on 5/14/2024 in #help
Nested SQL select returning [x: string]: unknown type
This may also be delving into SQL-specific questions, but I have a complex query where I'm joining ten tables and at points, the select object is nested three deep. (I'm fairly intermediate to SQL so if I'm thinking about this wrong, please tell me). I can get the query pretty close using the query builder syntax but I have to do some specific where/orderby selects that throw errors for some reason. No problem, I rewrite it in the db.select() syntax and it is now correctly returning data. However, the return type is just: { [x: string]: unknown; }[] Which is obviously useless for trying to use that data in my application. Not sure what I'm doing wrong here, so any help is appreciated!
2 replies