This repository has been archived by the owner on Mar 4, 2019. It is now read-only.
Releases: dmfay/massive-js
Releases · dmfay/massive-js
v4.0.1
v4.0.0
We're sticking to proper semver now, so this is a much less radical change than v2 to v3 was 😀
Breaking changes
- JSON traversal is now a lot simpler! If you were only using the built-in document table functionality, no need to worry since that's the same; but if you were building criteria objects with keys like
my_json_field->>innerField
, you can now use standard JavaScript.
and[]
notation and Massive will take care of the rest. find
has been standardized on criteria objects, and will no longer accept a*
wildcard.- Loader filters are also standardized: schema filters no longer accept
all
or*
wildcards.
New stuff
Only one item in here, but it's a big one: resultset decomposition has arrived! Check out the documentation for a full description, but otherwise I'll let the testcase speak for itself:
const issues = yield db.everything.find({}, {
decompose: {
pk: 'user_id',
columns: {
user_id: 'id',
username: 'username'
},
tests: {
pk: 'test_id',
columns: {
test_id: 'id',
name: 'name'
},
array: true,
issues: {
pk: 'id',
columns: {
id: 'id',
user_id: 'user_id',
test_id: 'test_id',
description: 'description'
},
array: true
}
}
}
});
assert.deepEqual(issues, [{
id: 1,
username: 'alice',
tests: [{
id: 1,
name: 'alice\'s test',
issues: [{
id: 1,
user_id: 1,
test_id: 1,
description: 'alice\'s issue'
}]
}]
}, {
id: 2,
username: 'bob',
tests: []
}, {
id: 3,
username: 'carol',
tests: [{
id: 2,
name: 'carol\'s first test',
issues: []
}, {
id: 3,
name: 'carol\'s second test',
issues: [{
id: 2,
user_id: 3,
test_id: 3,
description: 'carol\'s issue'
}]
}]
}]);
v3.3.0
v3.2.2
v3.2.1
v2.7.2
v3.2.0
One for the road, as work begins in earnest on some breaking changes for v4. New features:
- Massive will respect the connecting user's default
search_path
in the event that it isn'tpublic
. insert
has a newonConflictIgnore
option to prevent errors on collision.
v3.1.0
By weight this one's mostly internal cleanup and refactoring left over from 3.0.0, but there are some goodies:
Table.modify
accepts a criteria object for bulk document changesIS
andIS NOT
operators explicitly supported- Function invocation signatures sorted out
- Field discovery bugfix with
Table.update
- Stricter checks for valid input in
Table
functions - Fewer (hopefully no) driver warnings about inefficient I/O