xtdb

esp1 2024-10-29T16:58:06.807109Z

If have stored some values as keywords via XTQL, can I query those keyword values in SQL?

Oliver Marshall 2024-11-01T09:23:52.794729Z

@esp1 It seems to be up now. If it's still down for you would you mind pasting me the url you're trying?

esp1 2024-11-01T15:26:39.657669Z

It’s working now, thanks!

🙌 1
jarohen 2024-10-31T20:48:52.414179Z

> I'm asking because I have been trying to do this, but so far have been unsuccessful this should be possible, but as we've mentioned elsewhere, the SQL std-lib support for keywords is pretty limited. could you let us know what you've tried, let's see if there's an issue? (more generally, this level of interop isn't the most battle-tested part of our codebase - I suspect you're blazing the trail here) > unless xtdb has some equivalent notion of datomic’s isComponent we don't yet I'm afraid - something we need to give more consideration to given XTDB's schema-less nature

esp1 2024-10-31T21:11:06.491509Z

I was going to put some examples in XTDB Play, but that site doesn't seem to be working now?

jarohen 2024-10-31T21:25:25.591199Z

thanks, will get that raised

esp1 2024-10-29T18:18:01.750569Z

I'm asking because I have been trying to do this, but so far have been unsuccessful 😓

esp1 2024-10-30T05:18:27.483639Z

I was hoping to be able to use SQL to work around the https://clojurians.slack.com/archives/CG3AM2F7V/p1730215295755319?thread_ts=1730158019.233159&cid=CG3AM2F7V of not being able to query nested namespaced fields in XTQL. But if there is also an issue with being able to query keywords in SQL, then it feels like this may generally prevent me from using namespaced keyword attributes in my data. I'm really hoping that is not the case..!

esp1 2024-10-30T05:56:24.461489Z

Alternatively I could try to avoid nested data structures altogether and use a reference to another entity instead. I would just need to implement cascading deletes myself, unless xtdb has some equivalent notion of datomic’s isComponent?

esp1 2024-11-06T20:08:53.592769Z

Hm, I've been trying to recreate the issue I was having but I have been unable to. Somehow I got one of my tables into a state where I could not query for keyword values I had inserted via XTQL in SQL. However after recreating my database while trying to reproduce this issue, the issue has disappeared. I'm glad it's gone, but confused about what caused it in the first place. If I can reproduce the condition that causes the issue I'll post again here.