Replies: 1 comment 3 replies
-
Can we achieve this with raw SQL in the 1st place? If not then i don't think it's reasonable to add this feature, you should do it yourself by adding .catch after the promise, check the error code and rerun if it was duplicate id error Also we should choose better random id system if this problem happen, instead of doing this, cuz the chance you run into this kind of error is nearly zero with nowadays random id technique |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Means, if I pass
.values({ id: generateId(), title: 'Hello World })
it takes the passed id, if I pass.values({ title: 'Hello World })
it generatesid
itself by callinggenerateId()
intoDriver()
.Problem: The type is NOT NULL on db level but optional on TS level, how can this be modeled?
Beta Was this translation helpful? Give feedback.
All reactions