X
Xata4w ago
dream

Exclude special columns when fetching records

Using the xata typescript SDK, how do I exclude the xata.* and xata_* columns from the query results? I'm trying to maintain a two way sync between a client side user form and the database. These special columns make the form validation fail, I have to filter them out which is kind of frustrating. Is there a way to select all [*] columns and exclude these xata columns?
3 Replies
cmck
cmck4w ago
The xata columns are always returned, unfortunately, so they'll need to be fitlered out for form validation. https://xata.io/docs/sdk/get#columns-selection If your database has the "Native SQL Table" setting enabled (see screenshot), you should be able to create tables that do not require the xata columns (provided they have a unique not null column and/or primary key). This might be a workaround for your issue.
Getting records
Use the Xata SDK to get records
cmck
cmck4w ago
No description
dream
dreamOP4w ago
Alright thank you
Want results from more Discord servers?
Add your server