Firefox 3.0 中的 SQLite 存储

发布于 2024-12-08 11:40:38 字数 292 浏览 0 评论 0原文

我有一个支持 Firefox 3+ 的 Firefox 扩展,SQLite 数据库对我的扩展很重要。我在 MDN 上看到 API 可能会更改并且它“解冻”了,我应该这样做吗担心吗?

API 目前“未冻结”,这意味着它可能会发生变化 随时;事实上,它随着每个版本的发布而发生了一些变化 Firefox 自推出以来,并且可能会继续这样做 一会儿。

I have a Firefox extension that supports Firefox 3+, and SQLite database is important for my extension. I saw on the MDN that the API might change and it`s "unfrozen", should I be worried about it?

The API is currently "unfrozen", which means it is subject to change
at any time; in fact, it has changed somewhat with each release of
Firefox since it was introduced, and will likely continue to do so for
a while.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晨曦慕雪 2024-12-15 11:40:38

此警告可能已经过时,它已在多年前添加到文档的原始版本中,此后一直没有更新。事实上,从 Firefox 4 开始,所有 API 都已解冻并且可能会发生变化。但这确实不应该成为担心的理由。随着 SQLite 访问的发展,API 现在看起来相当成熟,Mozilla 开发人员大多在不引入重大更改的情况下调整性能。最重要的变化是 Firefox 3.5 中引入了异步 API 并弃用了同步 API。但只要你只使用异步API,你应该是安全的(我无法想象你真的需要支持古老的Firefox 3.0版本,我猜你实际上指的是Firefox 3.6)。

This warning is probably outdated, it has been added to the original version of the document years ago and hasn't been updated since. Fact is, starting with Firefox 4 all APIs are unfrozen and could change. But that shouldn't really be a reason to worry. As SQLite access goes, the API seems pretty mature by now and Mozilla developers are mostly tweaking performance without introducing breaking changes. The most important change was the introduction of asynchronous API in Firefox 3.5 and the deprecation of the synchronous API. But as long as you only use asynchronous API you should be on the safe side (I cannot imagine that you really need to support the ancient Firefox 3.0 release, I guess that you actually meant Firefox 3.6).

梦屿孤独相伴 2024-12-15 11:40:38

对于如此广泛使用的东西,我对此表示怀疑,但编写代码来解决这个问题并保持插件向后兼容(至少在 JavaScript 中)很容易。我最终所做的就是抽象出确实发生变化的方法,并将它们包装在我自己的调用中,这些调用会执行类似的操作

if (methodInFF3) doFF3Method();
else doNewMethod();

。这样,当事情发生变化时,我只需更改一个地方的代码,而不是许多地方的代码,但第一次发生这种情况时,我必须更改各处的代码。对于 SQLite,我可能不会太担心,但这只是我的问题,只要确保当新版本发布时,您检查文档以查看是否有任何更改,并且应该没问题。

For something so widely used I doubt it but it's easy enough to write code to work around that and keep your addon backwards compatible (at least in javascript). What I ended up doing is abstracting away methods that did change and wrapping them in my own calls that would do something like

if (methodInFF3) doFF3Method();
else doNewMethod();

or something like that. This way when things changed I only had to change the code in one place instead of many but then again the first time it happened I had to change the code everywhere. For SQLite I probably wouldn't worry too much though but that's just me, just make sure that when a new release comes out you check the docs to see if anything has been changed and you should be fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文