X
Xata3mo ago
Will Lutz

REST API - Unknown Column Type

I'm looking to wire Xata to a low-code frontend (Divhunt). I'm testing using the Rest API to get a list of entries from my table. The filtering function isn't working how I think it should. I use Prisma to manage the backend of my database. The column I'm filtering on is an Enum in Prisma.
"filter": {
"status": "APPROVED"
},
"filter": {
"status": "APPROVED"
},
But I keep getting this error: "message": "filter invalid: column [status]: unknown column type" What am I missing? How do I filter for this column value?
3 Replies
cmck
cmck3mo ago
Can you share the function you are using when filtering? I'll try to recreate the error. In general, you should be possible to filter by an enum column.
Will Lutz
Will LutzOP3mo ago
https://xxx.us-east-1.xata.sh/db/xxx:main/tables/Job/query Body I'm sending is:
{
"columns": ["title", "status"],
"filter": {
"status": "APPROVED"
},
"sort": {
"postedAt": "desc"
}
}
{
"columns": ["title", "status"],
"filter": {
"status": "APPROVED"
},
"sort": {
"postedAt": "desc"
}
}
cmck
cmck3mo ago
I was able to recreate this error with curl when attempting to filter by an enum column on a postgres-enabled table. At the moment, the enum type is not supported by the xata API which I suspect is the cause.
No description
Want results from more Discord servers?
Add your server