BinaryArtifex
Explore posts from serversv-bind not unwrapping reactive properties from composable
I have a helper composable here for orchestrating common aria attributes for form fields.
i try to use it in a consuming component without destructuring the returned object
and 'spreading' the props for each respective component via v-bind
however the v-bind only works if i either add the
.value
to the end of each object or if i destructure the values in the script and reference them that way. am i doing something wrong? i was under the impression v-bind unwraps computed values automagically....5 replies
nuxt cannot infer nested component naming convention
If i have a component at
components/app/app-button/app-button.vue
, the auto import expects a component called AppAppButton
, but if i remove the app-button folder and just have the component at components/app/app-button.vue
then nuxt is smart enough to accept an AppButton
import. I feel like this is a bug. I much prefer colocating styles, stories, tests, etc. with each of my components, hence the folder for each component. surely theres a way to tell nuxt not to append the root name of the path if it already exists on the component name or something or at least protections against arbitrarily removing identical prefixes on the next part of a prefix if it already exists?5 replies
loose css intellisense when using tailwind directive in style block
ive installed everything according to docs, however when i try to include tailwind directives with my style block, i immediately loose css intellisense
ive tried everything, css assocation to tailwind, ignore css validation, string suggestions...etc.
2 replies
how does nuxt prevent parallel session refresh attempts on a nested route?
one infuriating pain-point i have with Remix is that there is no sufficient way to refresh your session without each of your nested routes making the same request to refresh the session, resulting in 'n-1' wasted requests and no idempotent way of determining which one will win. ive been trying to look into how nuxt handles this, particularly for nested routes but can't seem to find a definitive answer to this issue....
3 replies
DTDrizzle Team
•Created by BinaryArtifex on 1/6/2024 in #help
how to add ulid compatibility to postgres?
Is there a way to create a custom ulid type with postgres to use as a primary key? it could either be automatically generated from the database side or passed in from the client. it was easy enough to create a custom type using mysql that was essentially just a char(26), however im trying to implement something a little closer to this article - https://blog.daveallie.com/ulid-primary-keys. any advice would be greatly appreciated. This is also in the context of having a supabase postgres instance.
2 replies
DTDrizzle Team
•Created by BinaryArtifex on 8/31/2023 in #help
help with a generic mysql2 connection
gday folks, im trying to create what is essentially a generic mysql2 connection that is compatible with planetscale but also compatible with a local msyql2 server running in docker, for instance...my production database is planetscale hosted and any sort of dev or testing i want to do locally. My connection at the moment is literally just
drizzle(connection, { mode: DB_MODE, schema })
however due to the sheer amount of options within the configuration im concerned im missing something crucial for the continued integration with planetscale with such a minimal config. granted the port, user, password, schema, etc are all in the uri, but is there anything else i should be considering?2 replies
DTDrizzle Team
•Created by BinaryArtifex on 7/31/2023 in #help
onDuplicateKeyUpdate ???
i don't suppose anyone knows how to actually use this method? zero documentation on it and the planetscale dbClient only recognises this method after the values function. There is no "onConflictDoUpdate" or "onConflictDoNothing"....i just want it so if there is an item with the same slug, ignore the query...
2 replies
DTDrizzle Team
•Created by BinaryArtifex on 7/29/2023 in #help
onConflictDoNothing does not exist on planetscale client
i am getting an "Property onConflictDoNothing does not exist on type" on the following script....
the client is a type of
PlanetScaleDatabase<typeof schema>
the only typesafe method i get is onDuplicateKeyUpdate
6 replies
DTDrizzle Team
•Created by BinaryArtifex on 7/29/2023 in #help
cannot set alias for composite primary key, getting (errno 1059) (sqlstate 42000) errors
My table has the following schema ->
when migrating to planetscale i get the following error ->
the generated sql produces this monster index for the composite primary key
how the heck can i set an alias for a composite primary key?
13 replies