[HN Gopher] Sq.io: jq for databases and more
       ___________________________________________________________________
        
       Sq.io: jq for databases and more
        
       Author : stavepan
       Score  : 61 points
       Date   : 2024-10-06 22:02 UTC (57 minutes ago)
        
 (HTM) web link (sq.io)
 (TXT) w3m dump (sq.io)
        
       | mlhpdx wrote:
       | Dang, I wish I had this while I still had SQL databases.
        
       | fforflo wrote:
       | I love the idea of pushing JQ and other DSLs close to the
       | database. I've written jq extensions for SQLite [0] and Postgres
       | [1], but my approach involves basically embedding=pushing the jq
       | compiler into the db. So you can do `select jq(json, jqprogram)`
       | as an alternative to jsonpath.
       | 
       | Trying to understand: Is the main purpose of this to use jq-
       | syntax for cataloging-like functionality and/or cross-query? I
       | mean it's quite a few lines of code, but you inspect the database
       | catalogs and offer a layer on top of that? I mean, how much data
       | is actually leaving the database?
       | 
       | [0] https://github.com/Florents-Tselai/liteJQ [1]
       | https://github.com/Florents-Tselai/pgJQ
        
       | candiddevmike wrote:
       | This is neat but I'm not really seeing anything I can't do with
       | standard SQL and CLI tools like psql. Seems like you'd learn more
       | reusable things using standard SQL too.
        
       | renewiltord wrote:
       | Related is Google's pipe syntax for SQL
       | https://research.google/pubs/sql-has-problems-we-can-fix-the...
        
       | robertclaus wrote:
       | More tools are always great! Even if it doesn't become the
       | mainstream, it's always great to see people explore new ways of
       | dealing with databases!
        
       | varenc wrote:
       | I love sq! Though my one wish is that the `sq` query language
       | (SLQ) supported substring matching like SQL's `... LIKE
       | "SOME_STRING%"`. Though you can just invoke SQL manually with `sq
       | sql --source @source "....."`
        
       ___________________________________________________________________
       (page generated 2024-10-06 23:00 UTC)