• As a developer of the compiler from prql to sql, I can say that I’m working on a new language because I know SQL quite in-depth.

      It seems ok on surface, but there are many inconsistenties that you either learn to live with or don’t even know are there until they trip you.

        • The way I perceive PRQL is somewhat like SQLAlchemy-Core (the SQL expression layer, not the ORM). Almost a 1:1 mapping to SQL but softening the rough edges in SQL when constructing more complex queries dynamically, in particular: no function calls, no real variables, only string concatenation. While SQLAlchemy-Core lets you even extract sub-queries into variables, I don’t know about how powerful PRQL is in this regard.

          From what I see from the docs I’m rather hopeful though.

  • Newtra ( Newtra@pawb.social ) 
    link
    fedilink
    arrow-up
    9
    ·
    3 years ago

    ooo, I love this. It reminds me of how nice C#'s LINQ is…

    “Pipeline style” DB queries have some interesting advantages as well:

    • It’s straightforward to write efficient queries for DBs that don’t include a query optimizer stares at Datomic
    • You can split the pipeline into server-side and client-side steps when working with less capable DBs stares at most of NoSQL
    • It would be much easier to transition from a pipeline API to a non-text-based API so that our ORMs/query builders can directly talk to DBs without the overhead of generating and parsing SQL.
  • pohart ( pohart@lemmyrs.org ) 
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 years ago

    Wow that looks really nice. Going into it I was expecting it to be a crappy procedural language, but it looks like a really nice alternative to SQL