-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: FindUnique by unique attribute #1204
Comments
This will be largely addressed in the upcoming However, we don't plan to support SQL unique constraints (other than the primary key), so this won't be 100% solved. |
We just released const slicer = await db.sql.query.slicers.findFirst({
where: (slicers, { eq }) => eq(slicers.address, slicerAddress),
}); Also, curious what your |
awesome, I'll look into it! this is the current schema |
as of v.0.6.22,
findUnique
only acceptsid
as parameter. it would be more useful if any unique attribute could be used to filter. this in turn would require adding support for marking columns as unique in the schema.relatedly, I think a
findFirst
would also be nice addition. my current workaround is the followingThe text was updated successfully, but these errors were encountered: