tomeverson
tomeverson
Explore posts from servers
DTDrizzle Team
Created by tomeverson on 8/18/2023 in #help
ERROR: operator does not exist: uuid = character varying
i forgor :3
19 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
same here got that issue
20 replies
DTDrizzle Team
Created by tomeverson on 9/4/2023 in #help
Prepared Statement doesn't exist
yep reset the DB url and it works
5 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
I think it should be
db.query.users.findMany({
with: {
followers: {
follower: true
}
}
})
db.query.users.findMany({
with: {
followers: {
follower: true
}
}
})
15 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
ohh my bad :)
15 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
yep :3
15 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
according to your schema
15 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
Many To Many Connection is hold by the users_followers table not by user table in Drizzle query i think you can do like:
db.query.users.findMany({
with: {
followers: {
followers: true
}
}
})
db.query.users.findMany({
with: {
followers: {
followers: true
}
}
})
15 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
yep
15 replies
DTDrizzle Team
Created by orenmizr on 9/4/2023 in #help
Help creating many to many (user has many followers, user has many followees)
I think you also have to put relationname in userFollowRelations
15 replies
DTDrizzle Team
Created by tomeverson on 9/4/2023 in #help
Prepared Statement doesn't exist
export const createHubVote = async (vote: NewHubVote) =>
await db.insert(hubVotes).values(vote);
export const createHubVote = async (vote: NewHubVote) =>
await db.insert(hubVotes).values(vote);
this is insert command
5 replies
DTDrizzle Team
Created by tomeverson on 9/4/2023 in #help
Prepared Statement doesn't exist
when I tested like
import { createHubVote } from "@/func/hub/vote";

const vote = async () => {
console.log("Testing..")
await createHubVote({
userId: 1,
hubPostId: 1,
vote: "LIKE"
})
}

vote().then(res => console.log(res)).catch(e => console.log(e))
import { createHubVote } from "@/func/hub/vote";

const vote = async () => {
console.log("Testing..")
await createHubVote({
userId: 1,
hubPostId: 1,
vote: "LIKE"
})
}

vote().then(res => console.log(res)).catch(e => console.log(e))
it shows
NeonDbError: connection closed
at <anonymous> (/Users/tom/Desktop/server/node_modules/@neondatabase/serverless/index.js:1530:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at createHubVote (/Users/tom/Desktop/server/func/hub/vote.ts:7:3)
at vote (/Users/tom/Desktop/server/src/test.ts:5:5) {
code: null,
sourceError: undefined
}
NeonDbError: connection closed
at <anonymous> (/Users/tom/Desktop/server/node_modules/@neondatabase/serverless/index.js:1530:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at createHubVote (/Users/tom/Desktop/server/func/hub/vote.ts:7:3)
at vote (/Users/tom/Desktop/server/src/test.ts:5:5) {
code: null,
sourceError: undefined
}
5 replies
DTDrizzle Team
Created by tomeverson on 8/23/2023 in #help
NeonDB: Migration Taking Long
idk why I reset the connection string and it works for now
5 replies
DTDrizzle Team
Created by tomeverson on 8/23/2023 in #help
NeonDB: Migration Taking Long
after like a 10 min
❌ Migration failed
NeonDbError: Error connecting to database: fetch failed
at <anonymous> (/Users/tom/Desktop/server/node_modules/@neondatabase/serverless/index.js:1523:86)
at migrate (/Users/tom/Desktop/server/node_modules/src/neon-http/migrator.ts:26:2)
at runMigrate (/Users/tom/Desktop/server/db/migrate.ts:23:3) {
code: null,
sourceError: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at <anonymous> (/Users/tom/Desktop/server/node_modules/@neondatabase/serverless/index.js:1521:61)
at migrate (/Users/tom/Desktop/server/node_modules/src/neon-http/migrator.ts:26:2)
at runMigrate (/Users/tom/Desktop/server/db/migrate.ts:23:3) {
cause: HeadersTimeoutError: Headers Timeout Error
at Timeout.onParserTimeout [as callback] (node:internal/deps/undici/undici:9748:32)
at Timeout.onTimeout [as _onTimeout] (node:internal/deps/undici/undici:8047:17)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}
}
❌ Migration failed
NeonDbError: Error connecting to database: fetch failed
at <anonymous> (/Users/tom/Desktop/server/node_modules/@neondatabase/serverless/index.js:1523:86)
at migrate (/Users/tom/Desktop/server/node_modules/src/neon-http/migrator.ts:26:2)
at runMigrate (/Users/tom/Desktop/server/db/migrate.ts:23:3) {
code: null,
sourceError: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at <anonymous> (/Users/tom/Desktop/server/node_modules/@neondatabase/serverless/index.js:1521:61)
at migrate (/Users/tom/Desktop/server/node_modules/src/neon-http/migrator.ts:26:2)
at runMigrate (/Users/tom/Desktop/server/db/migrate.ts:23:3) {
cause: HeadersTimeoutError: Headers Timeout Error
at Timeout.onParserTimeout [as callback] (node:internal/deps/undici/undici:9748:32)
at Timeout.onTimeout [as _onTimeout] (node:internal/deps/undici/undici:8047:17)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}
}
5 replies
DTDrizzle Team
Created by tomeverson on 8/18/2023 in #help
ERROR: operator does not exist: uuid = character varying
ohhh nvm :)
19 replies