Comparing version 1.0.0 to 1.1.0
@@ -0,1 +1,52 @@ | ||
### 1.0.0 @ May 14 2015 | ||
* [[`6ae45d83b6`](https://github.com/level/levelup/commit/6ae45d83b6)] - dispatchError() and readError() are voids (Lars-Magnus Skog) | ||
* [[`c8e22e70bd`](https://github.com/level/levelup/commit/c8e22e70bd)] - util.deprecate static functions (Julian Gruber) | ||
* [[`ef0ba86c99`](https://github.com/level/levelup/commit/ef0ba86c99)] - target multiple iojs versions, remove notifications (Lars-Magnus Skog) | ||
* [[`e19ec96ed7`](https://github.com/level/levelup/commit/e19ec96ed7)] - deprecate .approximateSize() (Julian Gruber) | ||
* [[`9c32ca9fcd`](https://github.com/level/levelup/commit/9c32ca9fcd)] - refactor read streams using level-iterator-stream and level-codec (Julian Gruber) | ||
* [[`8015e088cb`](https://github.com/level/levelup/commit/8015e088cb)] - tap -> tape + faucet (Lars-Magnus Skog) | ||
* [[`af125b580c`](https://github.com/level/levelup/commit/af125b580c)] - fix readStream *AsBuffer options (Julian Gruber) | ||
* [[`61b44463da`](https://github.com/level/levelup/commit/61b44463da)] - update dependencies (Lars-Magnus Skog) | ||
* [[`90352e999c`](https://github.com/level/levelup/commit/90352e999c)] - update changelog from 0.18.6 to 0.19.0 (Lars-Magnus Skog) | ||
* [[`b17e9e775b`](https://github.com/level/levelup/commit/b17e9e775b)] - Fixed valueEncoding bug by passing options without array. (Braydon Fuller) | ||
* [[`9576842794`](https://github.com/level/levelup/commit/9576842794)] - Added test for valueEncoding "hex" for createReadStream (Braydon Fuller) | ||
* [[`b9ce2ba2c5`](https://github.com/level/levelup/commit/b9ce2ba2c5)] - s/rvagg\/node-/level\// (Lars-Magnus Skog) | ||
* [[`7460209eb6`](https://github.com/level/levelup/commit/7460209eb6)] - fix stream-bench.js (Julian Gruber) | ||
* [[`2a2780c65c`](https://github.com/level/levelup/commit/2a2780c65c)] - refactor ltgt encoding (Julian Gruber) | ||
* [[`f53e349ec7`](https://github.com/level/levelup/commit/f53e349ec7)] - refactor iterators using new deferred-leveldown (Julian Gruber) | ||
* [[`e811f7e598`](https://github.com/level/levelup/commit/e811f7e598)] - remove leveled tests (Julian Gruber) | ||
* [[`b37cf16445`](https://github.com/level/levelup/commit/b37cf16445)] - fix benchmarks by installing leveldown@^0.10.4 (Julian Gruber) | ||
* [[`187711c96c`](https://github.com/level/levelup/commit/187711c96c)] - use level-codec (Julian Gruber) | ||
* [[`a1fda6bf2f`](https://github.com/level/levelup/commit/a1fda6bf2f)] - extract error codes into level-errors module (Lars-Magnus Skog) | ||
* [[`f4e5a44530`](https://github.com/level/levelup/commit/f4e5a44530)] - remove reference to write-stream and iterators (Lars-Magnus Skog) | ||
* [[`7372fceb4a`](https://github.com/level/levelup/commit/7372fceb4a)] - Changed options for get to same as put (Richard Littauer) | ||
* [[`7686899b6c`](https://github.com/level/levelup/commit/7686899b6c)] - add node 0.12 and iojs on travis (Lars-Magnus Skog) | ||
* [[`4aa6e8b7a5`](https://github.com/level/levelup/commit/4aa6e8b7a5)] - remove encoding option (Julian Gruber) | ||
* [[`b0247a436e`](https://github.com/level/levelup/commit/b0247a436e)] - Added errors to the available namespace when requiring 'levelup'. (Braydon Fuller) | ||
* [[`8b8da57f7a`](https://github.com/level/levelup/commit/8b8da57f7a)] - clean up old level-ws reference (Lars-Magnus Skog) | ||
* [[`3d26d39a43`](https://github.com/level/levelup/commit/3d26d39a43)] - update README with info on why WriteStream was removed (Lars-Magnus Skog) | ||
* [[`ba51315047`](https://github.com/level/levelup/commit/ba51315047)] - add Jarrett Cruger as contributor (Lars-Magnus Skog) | ||
* [[`ed89907f33`](https://github.com/level/levelup/commit/ed89907f33)] - remove unused dependencies (Lars-Magnus Skog) | ||
* [[`6067bb4467`](https://github.com/level/levelup/commit/6067bb4467)] - \[doc\] beginning of readme adjustment (Jarrett Cruger) | ||
* [[`78a06b3c10`](https://github.com/level/levelup/commit/78a06b3c10)] - \[fix\] update travis and package.json scripts (Jarrett Cruger) | ||
* [[`fcdd49b039`](https://github.com/level/levelup/commit/fcdd49b039)] - \[rm test\] remove fstream based tests (Jarrett Cruger) | ||
* [[`fb73bdecc0`](https://github.com/level/levelup/commit/fb73bdecc0)] - \[fix\] remove `copy` as it requires write-stream (Jarrett Cruger) | ||
* [[`616da299f9`](https://github.com/level/levelup/commit/616da299f9)] - \[fix test\] remove references to write-stream in tests (Jarrett Cruger) | ||
* [[`a712e623a7`](https://github.com/level/levelup/commit/a712e623a7)] - \[fix\] remove references to write-stream (Jarrett Cruger) | ||
* [[`9e6a6b7ef4`](https://github.com/level/levelup/commit/9e6a6b7ef4)] - update logo and copyright (Lars-Magnus Skog) | ||
* [[`8b339def43`](https://github.com/level/levelup/commit/8b339def43)] - check notFound on err (Brian Woodward) | ||
* [[`36658a2c7d`](https://github.com/level/levelup/commit/36658a2c7d)] - support values to be null/undefined (David Björklund) | ||
* [[`f0bc944005`](https://github.com/level/levelup/commit/f0bc944005)] - explicit devdep versions (Rod Vagg) | ||
* [[`c951f094eb`](https://github.com/level/levelup/commit/c951f094eb)] - Use newer memdown store. Fixes build. (Eduardo Sorribas) | ||
* [[`c2c12c9380`](https://github.com/level/levelup/commit/c2c12c9380)] - better document #del method (Ben West) | ||
* [[`2410aa3aff`](https://github.com/level/levelup/commit/2410aa3aff)] - resolve #261, explain args to callback to #del (Ben West) | ||
* [[`ef28adbe71`](https://github.com/level/levelup/commit/ef28adbe71)] - explicit devdep versions (Rod Vagg) | ||
* [[`723391bb93`](https://github.com/level/levelup/commit/723391bb93)] - Use newer memdown store. Fixes build. (Eduardo Sorribas) | ||
* [[`23b3f7be19`](https://github.com/level/levelup/commit/23b3f7be19)] - better document #del method (Ben West) | ||
* [[`02bb5c3856`](https://github.com/level/levelup/commit/02bb5c3856)] - resolve #261, explain args to callback to #del (Ben West) | ||
* [[`e77bbd4c7d`](https://github.com/level/levelup/commit/e77bbd4c7d)] - support values to be null/undefined (David Björklund) | ||
* [[`b9117a001b`](https://github.com/level/levelup/commit/b9117a001b)] - fixes the leveldb link (Manuel Ernst) | ||
* [[`3d541dbfc9`](https://github.com/level/levelup/commit/3d541dbfc9)] - remove 0.8 from travis (Rod Vagg) | ||
### 0.19.0 @ Aug 26 2014 | ||
@@ -2,0 +53,0 @@ |
@@ -307,3 +307,8 @@ /* Copyright (c) 2012-2015 LevelUP contributors | ||
options = getOptions(options) | ||
arr = self._codec.encodeBatch(arr_, options) | ||
arr = self._codec.encodeBatch(arr_, options) | ||
arr = arr.map(function (op) { | ||
if (!op.type && op.key !== undefined && op.value !== undefined) | ||
op.type = 'put' | ||
return op | ||
}) | ||
@@ -310,0 +315,0 @@ this.db.batch(arr, options, function (err) { |
{ | ||
"name": "levelup", | ||
"description": "Fast & simple storage - a Node.js-style LevelDB wrapper", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)", |
@@ -278,4 +278,8 @@ LevelUP | ||
### db.batch(array[, options][, callback]) *(array form)* | ||
<code>batch()</code> can be used for very fast bulk-write operations (both *put* and *delete*). The `array` argument should contain a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside LevelDB. Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the *type* is either `'put'` or `'del'`. In the case of `'del'` the `'value'` property is ignored. Any entries with a `'key'` of `null` or `undefined` will cause an error to be returned on the `callback` and any `'type': 'put'` entry with a `'value'` of `null` or `undefined` will return an error. | ||
<code>batch()</code> can be used for very fast bulk-write operations (both *put* and *delete*). The `array` argument should contain a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside LevelDB. | ||
Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the *type* is either `'put'` or `'del'`. In the case of `'del'` the `'value'` property is ignored. Any entries with a `'key'` of `null` or `undefined` will cause an error to be returned on the `callback` and any `'type': 'put'` entry with a `'value'` of `null` or `undefined` will return an error. | ||
If `key` and `value` are defined but `type` is not, it will default to `'put'`. | ||
```js | ||
@@ -282,0 +286,0 @@ var ops = [ |
@@ -45,2 +45,28 @@ /* Copyright (c) 2012-2015 LevelUP contributors | ||
, 'batch() no type set defaults to put': function (done) { | ||
this.openTestDatabase(function (db) { | ||
db.batch( | ||
[ | ||
{ key: 'foo', value: 'afoovalue' } | ||
, { key: 'bar', value: 'abarvalue' } | ||
, { key: 'baz', value: 'abazvalue' } | ||
] | ||
, function (err) { | ||
refute(err) | ||
async.forEach( | ||
['foo', 'bar', 'baz'] | ||
, function (key, callback) { | ||
db.get(key, function (err, value) { | ||
refute(err) | ||
assert.equals(value, 'a' + key + 'value') | ||
callback() | ||
}) | ||
} | ||
, done | ||
) | ||
} | ||
) | ||
}) | ||
} | ||
, 'batch() with multiple puts and deletes': function (done) { | ||
@@ -47,0 +73,0 @@ this.openTestDatabase(function (db) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187679
3355
656