- IndexedDB - Discussion
- IndexedDB - Useful Resources
- IndexedDB - Quick Guide
- IndexedDB - Ecmascript Binding
- IndexedDB - Promise Wrapper
- IndexedDB - Cursors
- IndexedDB - Searching
- IndexedDB - Error Handling
- IndexedDB - Transactions
- IndexedDB - Ranges
- IndexedDB - Indexes
- Using getAll() Functions
- IndexedDB - Deleting Data
- IndexedDB - Updating Data
- IndexedDB - Reading Data
- IndexedDB - Creating Data
- IndexedDB - Object Stores
- IndexedDB - Connection
- IndexedDB - Installation
- IndexedDB - Introduction
- IndexedDB - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
IndexedDB - ECMAScript Binding
Firstly, what is ECMAScript?
ECMAScript (European Computer Manufacturers Association Script) is a scripting language based on JavaScript.
JavaScript ES6 adds new syntaxes and features so that the code is more easily readable and we can write less code for the same functionapty. ES6 has many new features pke arrow functions, template strings, class destruction, etc.
Binding - Bind an object to a function and reference it using the ‘this’ keyword.
ECMAScript deals with keys, values, and keypaths.
It defines how key values defined in this specification are converted to and from ECMAScript values.
Extract a key from a value
To extract a key from a value using a key path with value, keyPath, and an optional multi-entry flag we need to follow the following steps. The results can be a key, invapd, failure, or even an exception.
Where r is the result of evaluating a keypath on a value with value and keypath. Rethrow any exceptions. If r is a failure return failure.
key be the result of converting a value to a key with r if the multi-entry flag is false, and the result of converting a value to a multi-entry key with r otherwise. Rethrow any exceptions.
If the key is invapd, return invapd.
Return key.