joshpachner
joshpachner
Explore posts from servers
CCConvex Community
Created by joshpachner on 9/22/2024 in #support-community
useQuery never enters Error state
When an error is thrown within the query the query stays in isLoading state. Within the query we throw expected errors. When a resource isn't found (ie the id doesn't exist in the database). We are using svelte. What do we need to do to get the useQuery to get into the error state? šŸ™šŸ™šŸ™
7 replies
CCConvex Community
Created by joshpachner on 8/23/2024 in #support-community
Is there a way to get around the Id<"tablename">
No description
15 replies
DTDrizzle Team
Created by joshpachner on 5/4/2024 in #help
Query View syntax error at or near "$1"
I've declared my view like such
export const myView = pgView("my_view", {
{my fields}
}).existing();
export const myView = pgView("my_view", {
{my fields}
}).existing();
And then when i query my view
const results = await db.select().from(myView)
const results = await db.select().from(myView)
I get the syntax error When printing out the sql of it via
const results = await db.select().from(myView).toSQL()
const results = await db.select().from(myView).toSQL()
Gives me these results
{
sql: "select from $1",
params: [
r {
[Symbol("drizzle:ViewBaseConfig")]: {
name: "my_view",
originalName: "my_view",
schema: undefined,
selectedFields: {
my fields
},
query: undefined,
isExisting: true,
isAlias: false
},
[Symbol("drizzle:PgViewConfig")]: undefined
}
]
}
{
sql: "select from $1",
params: [
r {
[Symbol("drizzle:ViewBaseConfig")]: {
name: "my_view",
originalName: "my_view",
schema: undefined,
selectedFields: {
my fields
},
query: undefined,
isExisting: true,
isAlias: false
},
[Symbol("drizzle:PgViewConfig")]: undefined
}
]
}
What am i missing? Any direction would be greatly appreciated šŸ™ Im on drizzle orm version 0.30.9
4 replies