Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
RedCrowbar
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
91.
▲
by
RedCrowbar
7y ago
Aggregate functions in EdgeDB have an "initial value", which, for `sum()` is defined as zero. Other aggregates, like `avg()` are not defined for empty sets (you cannot divide by 0), so an error is thrown in this case.
92.
▲
by
RedCrowbar
7y ago
Correct.
93.
▲
by
RedCrowbar
7y ago
>> Why not bottom, or are containers not covariant? I'm worried that we're not clear about the difference between variables and values. Yes, `{}` is inferred as `anytype`, but we chose to restrict its use in output for inter
94.
▲
by
RedCrowbar
7y ago
If fetched as JSON: {"favories": [{"director": null, "author": "J.K Rowling"}, {"director": "Spielberg", "author": null}, ...]} You can also query the actual object type
95.
▲
by
RedCrowbar
7y ago
EdgeDB is built on Postgres, it's not from scratch.
96.
▲
by
RedCrowbar
7y ago
In EdgeQL, expressions are element-wise functions over the cross-product of the input sets: edgedb> SELECT {'First', 'Second'} ++ '!'; {'First!', 'Second!'} EdgeQL queries ar
97.
▲
by
RedCrowbar
7y ago
`(a, b)` is a cross-product, just like "SELECT * FROM a, b"
98.
▲
by
RedCrowbar
7y ago
You can do that in EdgeDB: type Movie { property director -> str }; type Book { property author -> str }; type User { multi link favorites -> Movie | Book }; SELECT User { favorites: { [
99.
▲
by
RedCrowbar
7y ago
There are good examples in the tutorial: https://edgedb.com/docs/tutorial/queries#ref-tutorial-querie... The last query is still returning a flat set of Movie objects. The shape selector describes _related_ data t
100.
▲
by
RedCrowbar
7y ago
Yes, and that's actually the point being made in the post. You need to rewrite your queries to make SQL happy.
101.
▲
by
RedCrowbar
7y ago
There is a difference. You are right in a sense that scalar expressions are a form of a table expression, but... This is a valid expression: SELECT (SELECT count(*) FROM table) + 1 This is not: SELECT (SELECT * FROM table), 1
102.
▲
by
RedCrowbar
7y ago
Yes. EdgeDB actually used to have it earlier on, but we felt that the design wasn't good enough, so we dropped the FTS support for now. The idea is to have a datamodel/QL UI such that we are not just copying the Postgres FTS des
103.
▲
by
RedCrowbar
7y ago
> btw, do you implement any edgeql-specific optimizations? Not on the planner level. Most of EdgeQL-specific low-level stuff is currently built as an extension with helpers. Our strategy is to upstream as much as possible, including an
104.
▲
by
RedCrowbar
7y ago
Similar in spirit to Django and SQLAlchemy Core SQL expressions.
105.
▲
by
RedCrowbar
7y ago
The reference page has some details [1]. Our goal is to match and exceed the experience of managing the migrations with a high-level ORM like Django. This is one of the reasons behind the SDL/DDL duality. EdgeDB has to grow some toolin
106.
▲
by
RedCrowbar
7y ago
Yes, one of the main goals of EdgeDB is to provide improved ergonomics and productivity through a modernized data model and query language. And do that without a significant performance cost. Lower performance in benchmarks is explained by
107.
▲
by
RedCrowbar
7y ago
You got it! We designed EdgeQL from the first principles of the relational algebra and the set theory, with focus on practicality. There are a lot of similar ideas in Tutorial D, but EdgeQL is not a descendant of it.
108.
▲
by
RedCrowbar
7y ago
We are working on a similar query builder syntax for edgedb-python.
109.
▲
by
RedCrowbar
8y ago
Have you tried pg_upgrade?
110.
▲
by
RedCrowbar
8y ago
I don't think it's fair to call UP Express a failure yet. It certainly had a bumpy start, but the ridership seems to have been improving recently [1] [1] https://www.citylab.com/transportation/2018/01&#x
111.
▲
by
RedCrowbar
8y ago
> The latter can he mitigated by using "ordered UUIDs": you can generate UUID1 (nominally time-based) such that the final value has a sequential "head" and a random "tail" Specifically, in PostgreSQL such UU
112.
▲
by
RedCrowbar
8y ago
> materialized views Yes, although not in the initial release. EdgeDB _does_ support regular views, which, like the queries, can define arbitrary data hierarchies which can be treated like real object types. This topic deserves a separ
113.
▲
by
RedCrowbar
8y ago
If your schema consistently uses synthetic primary keys, maybe like the ones produced by some active record ORMs, then, yes. Theoretically, we could make an adapter that would make EdgeDB "understand" Django schemas, for example.
114.
▲
by
RedCrowbar
8y ago
> What would be nice to know is whether this can work on top of an existing PG database, providing easier syntax. That would require introspecting arbitrary relational schemas and trying to represent them as an object graph. I don'
115.
▲
by
RedCrowbar
8y ago
The [bracketed expression] is a target object type specifier in a path expression and can appear at any point in the path: User.<assignee[IS PullRequest].assignees[IS User].name The reason for the FILTER clause is that you may wan
116.
▲
by
RedCrowbar
8y ago
In a way, yes. EdgeDB implements type inheritance and abstract types, so you can have a schema like: abstract type Text: link body -> str type Post extending Text type Comment extending Text And then query Text instanc
117.
▲
by
RedCrowbar
8y ago
Matisse is close to a traditional ODBMS which implements .NET class mapping to SQL. EdgeDB is not an ODBMS in that sense, it is not tied to any platform or class model. The main differentiating point of EdgeDB is EdgeQL (and native GraphQL
118.
▲
by
RedCrowbar
9y ago
I have to disagree with this assessment. The change was to publish the Weekly content as standalone articles throughout the week rather than wait for the Weekly Edition. The Weekly Editions are still there if you prefer to read LWN once a
119.
▲
by
RedCrowbar
9y ago
PEP 394 is not set in stone. There have been occasional discussions on amending it, e.g [1] [1] https://mail.python.org/pipermail/linux-sig/2017-July/000029...
120.
▲
Let's Enhance – free online image upscale and enhancement with neural networks
(letsenhance.io)
21 points
by
RedCrowbar
9y ago
|
24 comments
More ›