Lurker News

Comments (323) 88 threads

Earlier comments
nknealk2 replies#
Can someone from EdgeDB explain why the SQL isn't as simple as what I have below? What am I missing? Why is that cross join lateral necessary:

  SELECT
      title,
      ARRAY_SLICE(ARRAY_AGG(movie_actors.name WITHIN GROUP (order by movie_actors.credits_order asc)),0,5)
      avg(movie_reviews.score)
  FROM movie
  JOIN movie_actors on (movie.id = movie_actors.movie_id)
  JOIN person on (movie_Actors.person_id = person.id)
  JOIN movie_reviews on (movie.id = movie_reviews.id)
  WHERE person.name like '%Zendaya%'
  group by title
RedCrowbar2 replies#
Because that only gives you actor names, not records, and also because arrays aren't a universal SQL feature.
eatonphil1 reply#
EdgeDB is already postgres specific though.
RedCrowbar1 reply#
EdgeDB currently is. Graph-relational and EdgeQL are not.

Continue this thread — 1 reply

nicoburns1 reply#
You can JSON_AGG to get whole records.
RedCrowbar#
Unfortunately, JSON aggregation destroys type information, so you can't reason about that your SQL query actually returns anymore.
RedCrowbar#
Also, this query is wrong because we want movies where Zendaya played, but _also_ other actors in order, possibly without Zendaya, so you really need to do the actors join twice.
colinmcd1 reply#
EdgeDB employee here. We're beyond excited to finally publish a stable release of EdgeDB after 4 years of active development and 15 pre-releases. Happy to answer any questions on here!
rmbyrro1 reply#
4 years!? Wow, I can't imagine how you guys are feeling today, congrats and all the best to the project!
pier251 reply#
Why is it called Edge though?

I immediately assumed it was some kind of distributed db running at the edge but it seems this is not the case.

sixo1 reply#
Probably in the sense of a graph edge.
1st1#
Yes, spot on.
skybrian2 replies#
It's a good sales pitch, but it's not immediately clear what the terms are. I see that there is a company behind this, that there's also a Github repo, and it appears you can install something without paying. But is it entirely open source? If not, what are they selling? What kind of business is this?
colinmcd#
Everything is fully OSS: the database, our client libraries, our CLI. There's a company behind it (I'm an employee) which will make money with a cloud hosting platform, similar to Mongo. We're calling that EdgeDB Cloud and it's still under development. Though you can self-host too on any major cloud. [0]

[0] https://www.edgedb.com/docs/guides/deployment/index

Load more comments