Xata

X

Xata

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

Join

help

general

Can we use ULIDs without a dedicated cluster?

We are looking for some solution between a Postgres serial and a long UUID. So ULIDs are a natural choice. I would use something like https://github.com/geckoboard/pgulid or https://github.com/pksunkara/pgx_ulid. But without a dedicated cluster we cannot create types/functions. So is there another way to use ULID-like IDs? I've seen that select ('rec_'::text || (xata_private.xid())::text) produces a similar result. Can we use this for the foreseeable future for our own ID fields?...

Am I forced to use Xata_id?

I'd want to use a numeric primary key if possible, secondly, I'd probably want to remove xata_id all together

Unable to get file attachment url when using xata.sql

When using xata.sql, I am not able to get the image url in the returned object, I get other attributes like enablePublicUrl: true, id: XXX', mediaType: 'image/webp', name: '759662.webp',...

Stripe / Payload CMS integration...

I'm trying to configure a next.js project with both Stripe and Payload. Stripe needs access to table header columns id. If i do Postgres, it forces a header column name of xata_id. Payload requires a Postgres enabled DB. I've gotten a schema to work perfectly via Neon, but I'm trying to use Xata as my db. I've gotten past all the "malformed schema file" issues and now it's just giving me one of two errors. Either the migration errors out or theres a runtime error when requesting data from Payload. I'm initiating brand new DB's as such: ``` npx xata init --schema=./schema.template.json --force...

inner join with rest api?

any change of do a inner join with rest api?

Issues with summarize table api rest

hi summarize is not working it shows: { "message": "" }...

Is it possible to do a sorted search?

I have this code and I want to sort the result by the created_at field ```typescript const profiles = await xata.search.all(searchQuery, { tables: [ {...

manage ilike in api?

theres any api method to search records like ILIKE ? or theres only LIKE available?

Migrations with Drizzle

Hi What is the current best practice regarding migrations when I'm using Drizzle with Xata? With Planetscale I just used Drizzle Kit's db push on db feature branches because the actual migration to prod was handled through the Planetscale dashboard....

Hi, trying to connect to a sample DB created by my self from Intellij IDEA, receive an error:

ERROR: column "rolconfig" does not exist Position: 312. ERROR: column t.xmin does not exist Position: 48. [42703] org.postgresql.util.PSQLException: ERROR: column n.xmin does not exist Position: 29

Non-default file attributes not accessible via Kysely query builder

If I try to fetch a file.signedUrl or file.uploadUrl using the Kysely query builder, null is returned even though the file exists. Are these properties only accessible via the Xata SDK as of now? If yes, this is a bit annoying because my Schema is very normalized and I need a lot of JOINs that are unsupported by the SDK atm. I tried several different methods to access the file.signedUrl property but this one would be the easiest way to access it (if it would work):...

Type of index

Hello. What type of index is used in vector search? Do you have an option to select HNSW?

How to run X number of operations in transaction

Hi, I am trying to upsert multiple records. According to the doc, I'll have to create update operations in transaction like before. const result = await xata.transactions.run([ { update: { table: 'titles', id: 'new-1', fields: { originalTitle: 'The third' }, upsert: true } }, ......

How to filter file column based on the size of the array with the TS SDK

xata.db.products.filter(images:, {$gt:1}) Is there something like this ?...

Get one record

I am trying to add an onClick event handler on the button Delete and creating a separate file for the xata client, which I will import. How can I go about it? https://track-trip-dashboard-with-xata-next.vercel.app/dashboard/note/rec_com0uagjjap6athudr6g ```js...

Does type "serial" exist in Xata/Drizzle?

I keep getting error: type "serial" does not exist when I push my schema: id: serial('id').primaryKey().notNull(), and if I do introspect I get this: id: integer("id").default(nextval('cv_theque_profiles_id_seq'::regclass)).primaryKey().notNull(), which is not valid syntaxically...
No description

Copy main branch data to a branch

is it possible to to create a new branch from main branch and also transfer the data too?

Link to table

I need help in understanding link to table when creating a new schema for a table connecting to another table in the database. Kindly share resources or jump on a call with me to get a clearer picture....

Double filtering by table

Filtering by "chunk" fails and duplicate chunks occur.
No description