-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
new encoding schemes for backends that support JS types #84
Comments
timkuijsten
changed the title
support for extra encoding schemes for backends that can store native JS types
new encoding schemes for backends that support native JS types
Feb 14, 2016
timkuijsten
changed the title
new encoding schemes for backends that support native JS types
new encoding schemes for backends that support JS types
Feb 14, 2016
timkuijsten
pushed a commit
to timkuijsten/level.js
that referenced
this issue
Feb 14, 2016
awaiting feedback from Level/abstract-leveldown#84
you can already write a custom encoding, a la var noop = function(){};
var none = { encode: noop, decode: noop };
db({ valueEncoding: none, keyEncoding: none }); iirc that should work, but haven't tried it |
This is supported, but note there's two layers to this.
down.prototype._serializeKey = function (key){ return key }
down.prototype._serializeValue = function (value){ return value } It's very likely we'll make this the default behavior. So in the future, only the backends that need to (because they can only store a subset of types - e.g. buffers and strings in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For backends like IndexedDB that support native JS types, should we introduce something like
none
,js
ornative
as a valid encoding for keyEncoding and valueEncoding?related to #83
The text was updated successfully, but these errors were encountered: