TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB

80 点作者 peter637超过 10 年前

8 条评论

streptomycin超过 10 年前
As someone who has extensively used&#x2F;abused IndexedDB in the development of <a href="http://basketball-gm.com/" rel="nofollow">http:&#x2F;&#x2F;basketball-gm.com&#x2F;</a> I can say that I&#x27;m really happy to see some serious libraries built on top of IDB. Years ago people said &quot;yeah, it doesn&#x27;t have all the features of Web SQL, but you could build something like that on top of it&quot; but now that&#x27;s finally starting to actually happen.<p>Other cool IDB projects are YDN-DB <a href="https://github.com/yathit/ydn-db" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yathit&#x2F;ydn-db</a> which continues to develop and Dexie <a href="https://github.com/dfahlander/Dexie.js/wiki/Dexie.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dfahlander&#x2F;Dexie.js&#x2F;wiki&#x2F;Dexie.js</a> which is also new.<p>I hope that some time in the near future I can stop writing ugly hacks in raw IDB to account for missing database features and browser incompatibilities. But I worry about losing performance if I delegate too much to one of these libraries (although I haven&#x27;t really started seriously testing them yet).
xtacy超过 10 年前
This documentation page is an excellent overview for anyone who wishes to understand how a declarative language such as SQL is actually translated to an execution plan behind the scenes:<p><a href="https://github.com/google/lovefield/blob/master/docs/dd/05_query_engine.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;lovefield&#x2F;blob&#x2F;master&#x2F;docs&#x2F;dd&#x2F;05_q...</a>
streptomycin超过 10 年前
<a href="https://github.com/google/lovefield/blob/master/docs/dd/04_cache.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;lovefield&#x2F;blob&#x2F;master&#x2F;docs&#x2F;dd&#x2F;04_c...</a><p><i>Lovefield has an in-memory row cache, which is conceptually a big map of row ids to rows (and that is why Lovefield has unique row ids across the board). Currently the cache is a &quot;dumb&quot; cache: it contains exact duplica of what are persisted in the IndexedDB. The reason for doing that is to workaround IndexedDB inefficiency of handing bulk I&#x2F;O, as described in backstore section. By caching all rows in memory, Lovefield avoids any additional round-trip required to load data from IndexedDB, with the price of memory usage.</i><p>How does that handle the case where the user has the app open in two tabs? Is there any synchronization?
ivanceras超过 10 年前
SQL-like? How about your use a real SQL used in SQLite, <a href="https://github.com/kripken/sql.js/" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kripken&#x2F;sql.js&#x2F;</a>
评论 #8658783 未加载
dangayle超过 10 年前
You need to support Python, Java AND Node.js for this? Sheesh.
vespakoen超过 10 年前
Here is a nice collection of node.js &#x2F; browser stuff that wraps around IndexedDB &#x2F; LevelDB &#x2F; WebSQL and is mostly compatible with one another.<p><a href="https://github.com/rvagg/node-levelup/wiki/Modules" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rvagg&#x2F;node-levelup&#x2F;wiki&#x2F;Modules</a>
VeejayRampay超过 10 年前
Now they only need to add a &quot;commitToServer()&quot; feature that uses some diff since the last commit and we got a stew going.<p>That tech is promising though, I like that we&#x27;re opening new possibilities all the time.
评论 #8659087 未加载
评论 #8658993 未加载
bjornlouser超过 10 年前
Why did you choose Lovefield as the project name over DealeyPlaza?