TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GlueSQL: SQL database engine as a library

117 pointsby fofozover 2 years ago

6 comments

jitlover 2 years ago
I’ve been thinking about writing a code analysis and refactoring tool that would expose facts like AST node info, expression typings, etc as queryable collections. To make this fast and interactive, you’d only compute the facts needed for a query and ideally incrementally maintain those as files change.<p>Rust used a Datalog library inside the borrow checker for this; I’d like to bring similar model to more languages so that some kinds of refactors or lints written as queries could potentially be shared between languages - for example, a lint rule that prohibits optional arguments to functions.<p>I wonder if GlueSQL would work naturally as this kind of “OSQuery for source code”.
评论 #33303688 未加载
评论 #33303932 未加载
infogulchover 2 years ago
Another &quot;database toolkit&quot; project that I&#x27;ve recently learned about is Apache DataFusion, also written in rust and uses Arrow memory format:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;apache&#x2F;arrow-datafusion&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apache&#x2F;arrow-datafusion&#x2F;blob&#x2F;master&#x2F;READM...</a>
评论 #33303612 未加载
jinmingjianover 2 years ago
Just another embedded SQL engine.<p>There are SQLite(OLTP), DuckDB(OLAP) and some engine-based project like mentioned Apache Arrow(<a href="https:&#x2F;&#x2F;arrow.apache.org&#x2F;)(OLAP)" rel="nofollow">https:&#x2F;&#x2F;arrow.apache.org&#x2F;)(OLAP)</a>: Apache Arrow has many language implementations, some do not include the query engine(for example, Rust implementation, which depends on the DataFusion for more SQL-like analytics) in its own repo, but other do include(for example, C++).<p>There is a comprehensive benchmark by ClickHouse for OLAP but including kinds of embedding engines: <a href="https:&#x2F;&#x2F;benchmark.clickhouse.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;benchmark.clickhouse.com&#x2F;</a><p>The more interesting is that, in fact, we have not an embedded HTAP engine. One of my database products already implements 3&#x2F;4 HTAP at the engine layer, but unfortunately it&#x27;s still just a free software, not an open source implementation.
评论 #33304935 未加载
0xb0565e487over 2 years ago
What&#x27;s the selling point here?
评论 #33304553 未加载
评论 #33303927 未加载
kevingaddover 2 years ago
Note that persistent storage appears to rely on &#x27;sled&#x27;, and according to sled&#x27;s github readme, sled&#x27;s persistent storage format is going to change in the future so you would need to manually migrate any databases.
yukIttEftover 2 years ago
Seeing the examples, I start to wonder if it would be possible to support real sql syntax from within a rust macro, that maybe even has access to local variables like LINQ?