Follow up of #494.
This could be an opportunity for optimization.
The spec mandates that IDBRecord's key and primarKey shall be the same value when being retrieved from an IDBObjectStore:
For cases where the key is not a primitive type (arrays, ...) it could be nice to state in the spec that the IDBRecord getters shall return the same JS object. i.e. be aliased.
Our the implementation side, even if data can be optimized to share underlying data in some cases, it would be even more efficient to not create a different JS object at all: this would save processing time and memory.
The observable effect is:
record.key === record.primaryKey would return true, while it returns false currently.
This could apply to IDBCursor too.
Follow up of #494.
This could be an opportunity for optimization.
The spec mandates that IDBRecord's key and primarKey shall be the same value when being retrieved from an IDBObjectStore:
For cases where the key is not a primitive type (arrays, ...) it could be nice to state in the spec that the IDBRecord getters shall return the same JS object. i.e. be aliased.
Our the implementation side, even if data can be optimized to share underlying data in some cases, it would be even more efficient to not create a different JS object at all: this would save processing time and memory.
The observable effect is:
record.key === record.primaryKeywould return true, while it returns false currently.This could apply to IDBCursor too.