Xata

X

Xata

This is Xata's community Discord server, where we discuss all things Xata: projects, features, dreams!

Join

help

general

Drizzle integration not working anymore

Hey guys, the update 0.29.5 of drizzle-orm broke the SDK as the class PreparedQuery was renamed to PgPreparedQuery and the xata implementation still uses the old name.

Making file attachment column public by default

Hi , I have created a column for file attachment without making it as public by default, Now I want to change it to public by default, how can I achieve it ? I don't see that option in xata schema edit command

File attachments disappearing when editing a column form web-ui

Hi I have a file column in my table and I inserted a image into it, after that if I click on the edit row Icon and change some other value on that record and click save changes button, my image file changes into bin file like the image below. Am I doing something wrong ?
No description

Db server in India

Hi Team, I'm from India and I find xata a very useful product in my tech stack. Unfortunately the nearest server to India I can find is Frankfurt, which is still far away and I can see it affects the latency of data retrieval. Will there be a Server setup done in India anywhere in the near future ? Thanks....

What is the best way to connect to two databases to the same project?

I have a Typescript project that needs to connect to two different Xata databases. I used xata init to initialise the project with one database and I was thinking it could be best to set up another XataClient with the other database URL, however this will mean the types will be out. Any help would be great!

Restore deleted rows

Hi, I mistakenly deleted a row in my table. Is there a way to restore this?

Field Names that are all caps cause Typescript Error.

While working with my database I noticed that , having a record with all caps caused Typescript error
No overload matches this call.
The last overload gave the following error.
Argument of type 'string' is not assignable to parameter of type '(Partial<EditableData<UsersRecord>> & Identifiable)[]
No overload matches this call.
The last overload gave the following error.
Argument of type 'string' is not assignable to parameter of type '(Partial<EditableData<UsersRecord>> & Identifiable)[]
...
No description

Query syntax in Typescript sdk

Is there any way I can do this using the typescript sdk ? Basically want to filter using calculated value SELECT *, (1 - (discounted_price / original_price)) * 100 AS discount_percentage...

My Web UI seems to be down currently

This request from dataPlanefetcher.ts is pending since a couple of minutes. I tried refreshing, signing out and in, clearing cache but nothing seems to be working. The request is just not getting through and my UI is completely empty. this is the section in the client-side code that fires the request: dataPlanefetcher.ts:94: ```...

Idea for Table-UI

Hi 🙂 I have an idea that would improve the UI: Have all columns unselected by default for (large) tables. I currently have a table with ~200 columns and 300 entries and it takes a while to load and unselect columns. If I would keep all columns selected, filtering would basically be impossible. If other users prefer to have the columns pre-selected, maybe a user-setting could provide customizability? Basically just a boolean that asks wether colums should be un/pre-selected....

Is there a easier way to handle JSONData without type checking every time

Hi Guys!, I am trying to use an serialized record object in my typescript app, but it shows an error stating that there is a possibility of the value could be JSONDataFile. So do I have to type check if it's a string every time or Is there a easier way ?
No description

Question about types in the Typescript client

Hi Team! Since one of the latests versions I got in Intellij the following warning: "Argument type {total_orders: {uniqueCount: {column: "order"}}} is not assignable to parameter type Dictionary<AggregationExpression<XataRecord>> | undefined "...
No description

Running queries with DISTINCT

Hi team! Is there a way to run queries with something like .distinct(["column_name"])? We know about summarize (https://xata.io/docs/sdk/summarize#what-can-summarize-do), but it has a limit on 1000 results (and defaults to 20)....

Different results using summarize vs filtering

Hi team (it's me, again), I'm seeing that, at least in the playground, there is a difference of results when using summaries vs using filtering query (I'll add examples). To make it short, summaries are only returning 20 results, whereas it should be returning more (22, in our current data set). Is there a limit of the number of results provided by a summarize call? It is returning only 20 results. I would like you guys to tell me that there is something very wrong in our code. Like we need to call summarize with something different....

Diagnosing Constraint Violation

Hi team! We are using a direct SQL to update rows in one of our databases. Some of them work, some of them throw a "constraint violation on transactions: link_m29iv801n56pd8oc7tk3q9nn2c" The requestId is "32375456-2959-9b47-925b-4f8fcbbaac14" ...

Can IDs of rows in different branches collide?

I'm using S3 and storing objects based on Xata ID's. Example: When I'm creating/deleting multiple test users (different Xata branch than main) and creating/deleting S3 objects along with them, is there a risk of overwriting actual user objects in S3? Currently the ID is the only differing part in the S3 path of the objects so I'm treating the ID's as globally unique. Could not find this in the Docs...

Slow Intellisense using VSCode on large Typescript Project

Hi everyone, I've been using Xata for ~2 months now on a Sveltekit+Typescript Project as my main DB. Overall I'm very happy and love the SDK! As my project is getting increasingly large (~10k lines of code + 30 dependencies/packages) I noticed that the Intellisense for the Xata SDK is slowing down. E.g. it takes up to 15 seconds for inline suggestions and "go to definition". This is really slowing down my productivity....

Objects with json columns after a summaries request provide properties as strings

Hi team, We are trying to run a summaries like: const summary = await xata.db.items.summarize({ columns: ["linkedTable.*"],...

Import CSV from UI saves data in `main` branch but not in the selected branch

Hi team, We are testing the import and export through CSV, and found out that when using the UI the data exported from a branch it is imported directly into the main branch, but not in the selected branch....