We have an index with keys of the form:
[ dim1, dim2, dim3, ... ]
e.g. created with:
This demonstrates the implementation of full text search for documents in Indexed DB.
The necessity of annotating records with the word list to populate the index is a limitation of the current Indexed DB API. A feature request to support custom
WHATWG-style logos for W3C/WICG specs - just because I like logos and a consistent iconography.
This is a hacky prototype of what IDB-on-Promises could look like.
STATUS: See this updated proposal instead.
See also:
https://github.com/slightlyoff/Promises/tree/master/historical_interest/reworked_APIs/IndexedDB
// Copyright 2019 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
// Basic p(r)olyfill for proposed feature | |
// This defines no successor of empty arrays, so the range for prefix | |
// [] or [[],[]] has no upper bound. | |
// An alternate definition would preclude adding additional nesting, | |
// so the range for prefix [] would have upper bound [[]] and the | |
// range for prefix [[], []] would have upper bound [[], [[]]]. |
#!/usr/bin/env bash | |
# Usage: | |
# echo -e "... $(text-style style ...) ..." | |
# echo -e "... $(text-reset) ..." | |
# echo -e "... $(text-color r g b) ..." | |
# echo -e "... $(background-color r g b) ..." | |
# | |
# Where: | |
# styles: |
This is a redo of the solution over in Indexed DB - N-Dimensional Selection but with a revised "API". The sample here takes a query in the form of an array of IDBKeyRange instances (or null), e.g.
select(index, [IDBKeyRange.bound(5, 7), null, IDBKeyRange.lowerBound(15000)], callback, complete);
Following proposal by @littledan
THIS NO LONGER MATCHES THE PROPOSED API AND SHOULD NOT BE USED
Just proof-of-concept. Do not use in production.
║ ═ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ -- normal | |
│ ─ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ -- infested | |
Save the Marines: | |
╔═╦╦═╦╦═╗╔═╦╦═╗ | |
╠╗╠╬═╝╚╦╩╣╔╝╚╗╚╗ | |
║║║╚╗╔╦╝╔╬╝╔═╬═╝ | |
╚╝╚═╩╝╚═╣╚═╣╔╩╦╗ | |
║╔╗║╚╦╝║ |