NinjaBunny
NinjaBunny
Explore posts from servers
DTDrizzle Team
Created by NinjaBunny on 3/10/2024 in #help
Programmatically get columns from table
I don't think this applies to relational queries as well
3 replies
DTDrizzle Team
Created by NinjaBunny on 7/1/2023 in #help
Error when trying to generate a migration schema
I’m not 100% sure if that was the cause of it, but I know it magically started working again once I updated the package for drizzle-kit
6 replies
DTDrizzle Team
Created by NinjaBunny on 7/1/2023 in #help
Error when trying to generate a migration schema
It happened a bit ago, but I think that’s what was wrong with the version of drizzle-kit
6 replies
DTDrizzle Team
Created by NinjaBunny on 7/1/2023 in #help
Error when trying to generate a migration schema
There was something wrong with that version of drizzle if I’m not mistaken
6 replies
DTDrizzle Team
Created by Amur on 8/22/2023 in #help
DB connections hangs after successful execution in Lambda locally
any updates on when this feature will be added?
22 replies
DTDrizzle Team
Created by Nicolas on 9/23/2023 in #help
Neon and Drizzle ORM: Can my schema.ts create my tables in Neon?
I believe so, if that's wrong please let me know
7 replies
DTDrizzle Team
Created by Nicolas on 9/23/2023 in #help
Neon and Drizzle ORM: Can my schema.ts create my tables in Neon?
find the introspection tool
7 replies
DTDrizzle Team
Created by Nicolas on 9/23/2023 in #help
Neon and Drizzle ORM: Can my schema.ts create my tables in Neon?
7 replies
DTDrizzle Team
Created by Nicolas on 9/23/2023 in #help
Neon and Drizzle ORM: Can my schema.ts create my tables in Neon?
I believe you can use the introspection tool that will create your tables based on the preexisting schema
7 replies
DTDrizzle Team
Created by DiamondDragon on 9/7/2023 in #help
No transactions support in neon-http driver even though neon provides a transaction function
20 replies
DTDrizzle Team
Created by DiamondDragon on 9/7/2023 in #help
No transactions support in neon-http driver even though neon provides a transaction function
let me find it
20 replies
DTDrizzle Team
Created by DiamondDragon on 9/7/2023 in #help
No transactions support in neon-http driver even though neon provides a transaction function
I thought neon only allowed transactions while using the serverless driver + a web socket connection
20 replies
DTDrizzle Team
Created by Headless on 9/9/2023 in #help
Bun with drizzle
I feel like you should also be wanting to just run the drizzle-kit command no? wont npx/bunx the most recent version of drizzle-kit from npm?
63 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
async findById(id: Id) {
return await this.db.query[this.model].findMany({
});
async findById(id: Id) {
return await this.db.query[this.model].findMany({
});
27 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
I think I already tried that and ran into a similar issue that being this error blob which I have no idea what it means
This expression is not callable.
Each member of the union type '(<TConfig extends DBQueryConfig<"many", true, ExtractTablesWithRelations<typeof //continues to print the entire table
This expression is not callable.
Each member of the union type '(<TConfig extends DBQueryConfig<"many", true, ExtractTablesWithRelations<typeof //continues to print the entire table
27 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
ahhh I saw that one, but the issue in particular is coming from the this.db.query, which is something that thread/other person had not implemented yet, and I was trying to implement that specific aspect
27 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
also no typing it as private readonly doesn't work because the query itself won't work
27 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
I don't think this is the right thread seems like a different issue
27 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
I was thinking of doing this in the instantiation of the class like this
@Injectable()
export abstract class CrudService<
Table extends PgTable,
Id extends keyof Table["$inferSelect"],
//change
Name = Table["_"]["name"]
> {
protected constructor(
private readonly table: Table,
private readonly pk: Id,
private readonly db: Database,
//change
private readonly name: Name,
) {}

async findById(id: Id) {
return await this.db.query[this.name].findFirst({});
// ^? => string and not the string value of the actual table
}
}
@Injectable()
export abstract class CrudService<
Table extends PgTable,
Id extends keyof Table["$inferSelect"],
//change
Name = Table["_"]["name"]
> {
protected constructor(
private readonly table: Table,
private readonly pk: Id,
private readonly db: Database,
//change
private readonly name: Name,
) {}

async findById(id: Id) {
return await this.db.query[this.name].findFirst({});
// ^? => string and not the string value of the actual table
}
}
27 replies
DTDrizzle Team
Created by Aidan Laycock on 8/17/2023 in #help
Conditional findFirst
and it just spits out the entire table
27 replies