Comments (3)
Have you tried? Did you receive an error message, did one or both fields retain their previous values, what happened? "I can't do" doesn't give me anything to go on. Please use the full issue template.
I can tell you that I've used update
to modify mixed ordinary and JSON values going back to Massive v2, and that this testcase passes:
it('updates mixed column types', function () {
return db.normal_pk.update(1, {field1: 'zeta', json_field: {a: 'b', c: {d: 'e'}}}).then(res => {
assert.equal(res.id, 1);
assert.equal(res.field1, 'zeta');
assert.deepEqual(res.json_field, {a: 'b', c: {d: 'e'}});
});
});
from massive-js.
Hi @dmfay, Sorry for late reply.
It actually override the existing body
object.
Is this possible to patch body
object ?
from massive-js.
Merging into existing JSON/JSONB values is only supported with updateDoc
. Your other options at present are to make sure you have the full body beforehand and use update
, or to create a script that merges your body changes with the ||
operator.
from massive-js.
Related Issues (20)
- Read replicas connections from Massive HOT 6
- Options fields does not work for insert HOT 4
- How do I add coordinate Document Tables creation with my migration tool? HOT 3
- Save to a table with column type jsonb[] HOT 16
- (node:533) UnhandledPromiseRejectionWarning: RangeError: Variable $1 out of range. Parameters array length: 0 HOT 3
- framework example for express.js HOT 10
- LIKE comparison on array using ANY() HOT 2
- Create type as enum HOT 2
- Issues with $ placeholds in QueryFiles, pg-promise HOT 6
- Better way to decompose using postgres HOT 1
- Transactions - getting error using async/await HOT 1
- Transaction that does insert and uses the id from that insert for next insert in transaction HOT 13
- Massive.js is not working with auto-increment fields HOT 4
- Document query generated includes >= operation HOT 2
- Problem successfully persisting or querying data, despite db.listTables() functioning correctly HOT 2
- Incompatibility with pg-promise event receive (with camel casing) HOT 13
- Does not work with Oracle?? HOT 2
- Question: Named Parameter Syntax HOT 2
- Database.prototype.clone performance bottleneck HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from massive-js.