Braveheart
Explore posts from serversDTDrizzle Team
•Created by Braveheart on 1/10/2024 in #help
Temporal custom type "TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and nul"
3 replies
DTDrizzle Team
•Created by Braveheart on 1/3/2024 in #help
Performing Drizzle ORM migration in vitest results in permission errors
In a test i'm using Drizzle ORM to do migrations in vitest beforeAll, but it doesn't work like when I run a script from
which then calls this
but when running in a test file I get root cause error:
and then results in
1 replies
DTDrizzle Team
•Created by Braveheart on 12/29/2023 in #help
Extract type from drizzle join for use elsewhere or exporting
I get the type in the same function scope like so
eventRecurringPatterns
is typed with {event ,recurring_pattern}
but how do I extract this type for use in other function params? Maybe with Parameters<typeof theJoin>
I want to avoid doing it manually
I imagine it starts something like this screenshot3 replies
DTDrizzle Team
•Created by Braveheart on 12/27/2023 in #help
disk I/O error when running migration in context of vitest runner
I'm building a robust drizzle event selector
https://github.com/quantuminformation/drizzle-sqlite-recurring-events
In my test suite I am doing this:
7 replies
DTDrizzle Team
•Created by Braveheart on 12/26/2023 in #help
inferSelect doesnt take into account defaults in schema
13 replies
DTDrizzle Team
•Created by Braveheart on 12/26/2023 in #help
value.getTime is not a function
this code in this basic repo
https://github.com/quantuminformation/drizzle-sqlite-recurring-events
when running
pnpm run db:seed
gives error
you can see that getTime works when debugging in vscode so I don't know where this error originates3 replies
DTDrizzle Team
•Created by Braveheart on 11/25/2023 in #help
Steps to fix errors like `drizzle/meta/0000_snapshot.json data is malformed`
1 replies
using the callback to <Show> and update store, results in whole store being set to new value
if I do this in form
setFormDataStore({ companyDetails: { phoneNumber: e.currentTarget.value } });
then the only value in the store is as follows: causing other part to throw undefined errors34 replies
Typesafe <Show> only when store has data
the end result I want
I've tried various things like
createStore<StoreType | {}>({});
-> results in ts errors X doesn't exist on {}
re assigning store to previous declarations
the easy way around this is to create store type object of just empty values until the real values come, but that just seems lame :
49 replies
False positive: `Make sure your app is wrapped in a <Router />` , @solidjs/router 0:7:0 - in npm lib
I have a npm component ( <O_Header) that assumes a router is wrapping it, ie, uses <A> tags
wrapping the app in a router:
usage in the problem project
utils.js?v=84c27385:28 Uncaught Error: Make sure your app is wrapped in a <Router />
at invariant (utils.js?v=84c27385:28:15)
at useRouter (routing.js?v=84c27385:9:32)
at useRoute (routing.js?v=84c27385:11:75)
at useResolvedPath (routing.js?v=84c27385:13:19)
at A (components.jsx:80:16)
at dev.js:524:12
at untrack (dev.js:427:12)
at Object.fn (dev.js:520:37)
9 replies
Access dynamic route params in components outside of the FileRouter
In this structure:
I need the header to render the following:
<A href={
/${params.lang}/sign_in} class="navAction">
where lang is derived from this url http://localhost:3000/en
however params.lang is undefined unless its inside a route7 replies