Hacker News new | past | comments | ask | show | jobs | submit | RedCrowbar's comments login

EdgeDB is NOT an object store. It is "relational model enhanced" instead where a set is a fundamental building block [1] so not just relations are sets, but attributes can be sets also.

[1] https://www.edgedb.com/docs/edgeql/sets#ref-eql-everything-i...


If your database client is any good, it should do the retries for you. EdgeDB uses serializable isolation (as the only option), and all our bindings are coded to retry on transaction serialization errors by default.

Transaction deadlocks are another common issue that is triggered by concurrent transactions even at lower levels and should be retried also.


I'm curious how you can handle transaction deadlocks at a low level - there might have been a lot of non-SQL processing code that determined those values and blindly re-playing the transactions could result in incorrect data.

We handle this by passing our transaction a function to run - it will retry a few times if it gets a deadlock. But I don't consider this to be very low level.


“We handle this by passing our transaction a function to run - it will retry a few times if it gets a deadlock. But I don't consider this to be very low level.”

Oh neat, I was just thinking about something like this the other day.


Yes. Apache 2.0 licensed with lots of focus on local-first development.


There is a work-in-progress query builder support for .NET: https://github.com/edgedb/edgedb-net/tree/feat/querybuilder-...


Oh neat. I didn't realize a query builder is being worked on.


We wrote a blog post about this specifically: https://www.edgedb.com/blog/why-orms-are-slow-and-getting-sl...


> Can EdgeDB solve the problems like `soft-delete`?

Yes, with access policy rules. E.g

   global hide_deleted: bool;

   type SoftDeletable {
     deleted: bool;

     access policy hide_deleted
       allow all
       when (global hide_deleted)
       using (not .deleted);
   }
The above will effectively "hide" objects with `.deleted` set to `true` from all queries when the `hide_deleted` global is set to true.

> How about hooks, for example, I want to trigger scripts after/before a record is added to the table.

EdgeDB supports triggers: https://www.edgedb.com/docs/changelog/3_x#triggers. Future versions will add support for causing effects outside of the database, e.g. call a WebHook or some such.


No plans for that yet. We feel EdgeQL is a far superior choice for the intended use case of application development.


Yes, although rewrites are fairly minimal. Mostly limited to name mangling.


That's really cool.

Any chance you'd be able to link the relevant parts of the code?

I had a look through the "/pg" directory but there was a lot there and it wasn't immediately clear which parts did what



Thank you!



Yes, we are looking into possibly supporting in-place upgrades in future releases.


Efficient transitive closure (aka link recursion) is something we plan to tackle soon (see https://github.com/edgedb/edgedb/discussions/2634 for some discussion on the topic).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: