Xata

X

Xata

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

Join

help

general

Xata DB Clone & Xata permissions

Hello!, i have two questions: 1. Does xata have any option to clone entire databases, with the tables and information inside, to be able to test in develop? 2. Does xata have any options to limit member permissions in workspaces? For example, a member can only access a database in a workspace. Thanks!, and sorry for my bad english 🫠...

SQL Query working differently in playground vs SDK

Hi (again), I have the following code: ``const subquery = SELECT DISTINCT (o.id)...

Cannot perform I/O on behalf of a different request in Cloudflare Workers

Ok, so this may be a long one... I have several cloudflare workers that write or request data from Xata. When I do a single request using the TypeScript SDK, it works OK. When I do several requests like in a await Promise.all(array.map(async arrayElem => queryToXata(arrayElem))), then I get an error like: ...

Storing objects of a specific class

Hello. Could you please tell me how to store an object of type "Document" (from langchain.docstore.document import Document) in a table?

Xata Starter Guide Next.JS trouble

Just following allong with the Getting Started with Next.js and Xata guide and I'm getting this error: ```"npm:@xata.io/client@latest Module build failed: UnhandledSchemeError: Reading from "npm:@xata.io/client@latest" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default....

Route handlers in Next.js

How do I use route handlers in next.js to post data to Xata?

Drizzle ORM schema conflict with xata_createdat and xata_updatedat

This is my drizzle schema: ```typescript export const users = pgTable('users', { id: text('id').primaryKey(), email: text('email').unique(),...

Error on Generated Column

I tried executing a generated column statement as per example, but geting this error, "message":"invalid SQL: unsupported statement [ALTER TABLE] on strict level, see https://xata.io/sql-support for the support matrix The statement I executed is attached in the image. Is there something wrong ?...
No description

Remix v2.8.1 (vite) on Vercel serverless function timeout when making xata db calls

The app is deploying properly and I can't see any issues in the runtime logs on Vercel. The serverless function (Node.js 20x) just timeouts after 60 seconds. Via console.logs I'm pretty sure it's related to a xata query. In the build logs I see the following warnings (not sure if this is related): ```...

Should I commit `.ledger` dir

I am using xata in a node js framework. Should I be committing the .ledger folder to git?

Directly connect to Postgres instance

Hi! I love working with the Xata UI and SDK! I really miss some features like setting up Triggers and Indices myself. Will this be available with with the the roadmap item "Exposing PostgreSQL: Expose the PostgreSQL wire protocol to directly connect to the Xata PostgreSQL database and your favorite ORMs."? When can we roughly expect to have this functionality?...

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...