Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate/remove FF experimental local-specific IndexDB sorting #31996

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8695,6 +8695,7 @@
/en-US/docs/Web/API/IDBKeyRange/lowerBound /en-US/docs/Web/API/IDBKeyRange/lowerBound_static
/en-US/docs/Web/API/IDBKeyRange/only /en-US/docs/Web/API/IDBKeyRange/only_static
/en-US/docs/Web/API/IDBKeyRange/upperBound /en-US/docs/Web/API/IDBKeyRange/upperBound_static
/en-US/docs/Web/API/IDBLocaleAwareKeyRange /en-US/docs/Web/API/IDBIndex
/en-US/docs/Web/API/IDBMutableFile /en-US/docs/Web/API/IndexedDB_API
/en-US/docs/Web/API/IDBMutableFile/abort_event /en-US/docs/Web/API/IndexedDB_API
/en-US/docs/Web/API/IDBMutableFile/error_event /en-US/docs/Web/API/IndexedDB_API
Expand Down
10 changes: 0 additions & 10 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -43042,16 +43042,6 @@
"chrisdavidmills"
]
},
"Web/API/IDBLocaleAwareKeyRange": {
"modified": "2020-10-15T21:38:45.838Z",
"contributors": [
"teoli",
"fscholz",
"Sebastianz",
"Seta00",
"chrisdavidmills"
]
},
"Web/API/IDBObjectStore": {
"modified": "2020-10-15T21:10:03.883Z",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/idbindex/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ You can grab a set of keys within a range. To learn more, see {{domxref("IDBKeyR

## Instance properties

- {{domxref("IDBIndex.isAutoLocale")}} {{ReadOnlyInline}} {{ Non-Standard_inline() }} {{Experimental_Inline}}
- {{domxref("IDBIndex.isAutoLocale")}} {{ReadOnlyInline}} {{deprecated_inline}} {{ non-standard_inline }} {{experimental_inline}}
- : Returns a boolean value indicating whether the index had a `locale` value of `auto` specified upon its creation (see the [`options`](/en-US/docs/Web/API/IDBObjectStore/createIndex#options) parameter to [`IDBObjectStore.createIndex()`](/en-US/docs/Web/API/IDBObjectStore/createIndex).)
- {{domxref("IDBIndex.locale")}} {{ReadOnlyInline}} {{ Non-Standard_inline() }} {{Experimental_Inline}}
- {{domxref("IDBIndex.locale")}} {{ReadOnlyInline}} {{deprecated_inline}} {{ non-standard_inline }} {{experimental_inline}}
- : Returns the locale of the index (for example `en-US`, or `pl`) if it had a `locale` value specified upon its creation (see the [`options`](/en-US/docs/Web/API/IDBObjectStore/createIndex#options) parameter to [`IDBObjectStore.createIndex()`](/en-US/docs/Web/API/IDBObjectStore/createIndex).)
- {{domxref("IDBIndex.name")}}
- : The name of this index.
Expand Down
3 changes: 2 additions & 1 deletion files/en-us/web/api/idbindex/isautolocale/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ short-title: isAutoLocale
slug: Web/API/IDBIndex/isAutoLocale
page-type: web-api-instance-property
status:
- deprecated
- experimental
- non-standard
browser-compat: api.IDBIndex.isAutoLocale
---

{{APIRef("IndexedDB")}}{{SeeCompatTable}}{{Non-standard_Header}}
{{APIRef("IndexedDB")}}{{deprecated_header}}

The **`isAutoLocale`** read-only property of the {{domxref("IDBIndex")}} interface returns a boolean value indicating whether the index had a `locale` value of `auto` specified upon its creation (see the [`options`](/en-US/docs/Web/API/IDBObjectStore/createIndex#options) parameter to [`IDBObjectStore.createIndex()`](/en-US/docs/Web/API/IDBObjectStore/createIndex).)

Expand Down
3 changes: 2 additions & 1 deletion files/en-us/web/api/idbindex/locale/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ short-title: locale
slug: Web/API/IDBIndex/locale
page-type: web-api-instance-property
status:
- deprecated
- experimental
- non-standard
browser-compat: api.IDBIndex.locale
---

{{APIRef("IndexedDB")}}{{SeeCompatTable}}{{Non-standard_Header}}
{{APIRef("IndexedDB")}}{{deprecated_header}}

The **`locale`** read-only property of the {{domxref("IDBIndex")}} interface returns the locale of the index (for example `en-US`, or `pl`) if it had a `locale` value specified upon its creation (see the [`options`](/en-US/docs/Web/API/IDBObjectStore/createIndex#options) parameter to [`IDBObjectStore.createIndex()`](/en-US/docs/Web/API/IDBObjectStore/createIndex).) Note that this property always returns the current locale being used in this index, in other words, it never returns `"auto"`.

Expand Down
76 changes: 0 additions & 76 deletions files/en-us/web/api/idblocaleawarekeyrange/index.md

This file was deleted.

2 changes: 0 additions & 2 deletions files/en-us/web/api/indexeddb_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ To get access to a database, call [`open()`](/en-US/docs/Web/API/IDBFactory/open
- : Iterates over object stores and indexes and returns the cursor's current value.
- {{domxref("IDBKeyRange")}}
- : Defines a key range that can be used to retrieve data from a database in a certain range.
- {{domxref("IDBLocaleAwareKeyRange")}} {{Non-standard_inline}}
- : Defines a key range that can be used to retrieve data from a database in a certain range, sorted according to the rules of the locale specified for a certain index (see the [`options`](/en-US/docs/Web/API/IDBObjectStore/createIndex#options) parameter to [`IDBObjectStore.createIndex()`](/en-US/docs/Web/API/IDBObjectStore/createIndex).) This interface isn't part of the 2.0 specification.

### Custom event interfaces

Expand Down
17 changes: 0 additions & 17 deletions files/en-us/web/api/indexeddb_api/using_indexeddb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,23 +624,6 @@ In fact, there is no way to guarantee that IndexedDB transactions will complete,

At least with the addition of the abort notifications and {{domxref("IDBDatabase.close_event", "IDBDatabase.onclose")}}, you can know when this has happened.

## Locale-aware sorting

Mozilla has implemented the ability to perform locale-aware sorting of IndexedDB data in Firefox 43+. By default, IndexedDB didn't handle internationalization of sorting strings at all, and everything was sorted as if it were English text. For example, b, á, z, a would be sorted as:

- a
- b
- z
- á

which is obviously not how users want their data to be sorted — Aaron and Áaron for example should go next to one another in a contacts list. Achieving proper international sorting therefore required the entire dataset to be called into memory, and sorting to be performed by client-side JavaScript, which is not very efficient.

This new functionality enables developers to specify a locale when creating an index using {{domxref("IDBObjectStore.createIndex()")}} (check out its parameters.) In such cases, when a cursor is then used to iterate through the dataset, and you want to specify locale-aware sorting, you can use a specialized {{domxref("IDBLocaleAwareKeyRange")}}.

{{domxref("IDBIndex")}} has also had new properties added to it to specify if it has a locale specified, and what it is: `locale` (returns the locale if any, or null if none is specified) and `isAutoLocale` (returns `true` if the index was created with an auto locale, meaning that the platform's default locale is used, `false` otherwise.)

> **Note:** This feature is currently hidden behind a flag — to enable it and experiment, go to `about:config` and enable `dom.indexedDB.experimental`.

## Full IndexedDB example

We have a complete example using the IndexedDB API. The example uses IndexedDB to store and retrieve publications.
Expand Down
Loading