We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd51a0d commit 68ff7ebCopy full SHA for 68ff7eb
README.md
@@ -121,6 +121,22 @@ async function updateExample() {
121
name: "Joe",
122
age: 18,
123
});
124
+
125
+ // incrBy with number
126
+ row = await query.where("name", "Joe").incrBy("age", 1);
127
128
+ // incrBy with string
129
+ row = await query.where("name", "Joe").incrBy("age", "1");
130
131
+ // incrBy with Callback
132
+ let result = { status: "success" };
133
+ row = await query.where("id", 1).incrBy("error_times", () => {
134
+ // increase error_times if result.status is not success
135
+ if (result.status !== "success") {
136
+ return 1;
137
+ }
138
+ return 0;
139
+ });
140
}
141
142
async function deleteExample() {
0 commit comments