gpt4 book ai didi

sql - IndexedDB排序

转载 作者:行者123 更新时间:2023-12-03 03:02:57 26 4
gpt4 key购买 nike

我是一名SQL专家,但是我现在已经开始在Dart中编程脱机应用程序,并且使用IndexedDB似乎是存储本地数据的推荐方法。我正在使用LawnDart与这些IndexedDB数据库一起工作,并生成自己的唯一键(仅是unix时间戳),并将数据作为JSON字符串存储在value列中。

我的问题是我如何然后按JSON字符串中包含的列对数据进行排序?还是我完全以错误的方式使用此数据库?

干杯!

最佳答案

我认为您想要的是WebSQL(使用SQLite)。

  • IndexedDB in Dart

    WebSQL is a SQLite database in the browser, supported by Webkit based browsers. WebSQL is powerful and fairly well understood, but will not be implemented in Firefox or Internet Explorer, and the spec is in limbo.


  • IndexedDB似乎只是一个KeyValue存储。
    您必须在IndexedDb中创建其他索引(并且可能将对象存储在每个索引中),以便以不同的顺序对相同的值进行排序。

    关于sql - IndexedDB排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21931264/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com