AlcaponeYou
DTDrizzle Team
•Created by Ꚃimon on 8/9/2023 in #help
Nullable relational query?
Sorry this is entirely my fault. The error I got wasa b/c I forgot to export the reference model. Relational queries on nullable fields are working.
15 replies
DTDrizzle Team
•Created by Ꚃimon on 8/9/2023 in #help
Nullable relational query?
Awesome, looking forward to it. Do you have an ETA on the release?
15 replies
DTDrizzle Team
•Created by Ꚃimon on 8/9/2023 in #help
Nullable relational query?
@Dan Kochetov hi, is it possible to use the relations on a
nullable
field? When I try to query using with: { maybeNull: true }
, it throws an error: Cannot read properties of undefined (reading 'column's)
.
When maybeNull
isn't null, the query works.15 replies
DTDrizzle Team
•Created by kraustifer on 8/15/2023 in #help
Count of one-to-many relation in query
eg:
Note you have to wrap the query in parenthesis.
5 replies
DTDrizzle Team
•Created by kraustifer on 8/15/2023 in #help
Count of one-to-many relation in query
Oh wait it's already supported, the docs just aren't updated.
5 replies
DTDrizzle Team
•Created by kraustifer on 8/15/2023 in #help
Count of one-to-many relation in query
I'm curious if this will be supported in the future too.
5 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
np, did you figure out what you did wrong before
20 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
and an example query:
20 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
Instead of a "followings" table, I have a "relations" table that describes friendship + followerships, but the idea is the same:
users:
relations:
20 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
Yes I'll be home in about an hour
20 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
Uncomment the blocks
20 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
nvm got this working now, I had a typo in the
relationName
(extra s in followings)20 replies
DTDrizzle Team
•Created by Skyler on 6/4/2023 in #help
Many to many relationship between one type
@minion3665 did you get this working? In your example above, you have
Following = pgTable("followers", {
the mismatch between Following and followers is confusing. Did you also have a separate "followings" table?20 replies
DTDrizzle Team
•Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
oh you're trying to get the inserted data. I forgot mysql doesn't have
returning
. I wonder if drizzle has .returning()
for mysql. I'm using sqlite and I'm able to do returnining().get()
to retrieve the new inserted data10 replies
DTDrizzle Team
•Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
can you post the schema of the table, and the ts code too. I've made mistakes where I duplicated the table column name which overrides the pk.
10 replies
DTDrizzle Team
•Created by Jim on 6/26/2023 in #help
TypeError when adding subquery to `drizzle.insert.values`
might be a bug w/ drizzle. I haven't tried subquery on insert yet
6 replies
DTDrizzle Team
•Created by Jim on 6/26/2023 in #help
TypeError when adding subquery to `drizzle.insert.values`
6 replies
DTDrizzle Team
•Created by nikivi on 6/26/2023 in #help
Get issue trying to run libsql/turso example
then rerun
147 replies
DTDrizzle Team
•Created by nikivi on 6/26/2023 in #help
Get issue trying to run libsql/turso example
and
topics
147 replies
DTDrizzle Team
•Created by nikivi on 6/26/2023 in #help
Get issue trying to run libsql/turso example
drop table users;
147 replies