File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -143,22 +143,24 @@ public function id($_id = false)
143
143
/**
144
144
* Add pending document for insert
145
145
* @param array $data
146
+ * @return mixed
146
147
*/
147
148
public function insert ($ data = [])
148
149
{
149
150
150
- $ this ->action ('index ' , $ data );
151
+ return $ this ->action ('index ' , $ data );
151
152
152
153
}
153
154
154
155
/**
155
156
* Add pending document for update
156
157
* @param array $data
158
+ * @return mixed
157
159
*/
158
160
public function update ($ data = [])
159
161
{
160
162
161
- $ this ->action ('update ' , $ data );
163
+ return $ this ->action ('update ' , $ data );
162
164
163
165
}
164
166
@@ -168,14 +170,15 @@ public function update($data = [])
168
170
public function delete ()
169
171
{
170
172
171
- $ this ->action ('delete ' );
173
+ return $ this ->action ('delete ' );
172
174
173
175
}
174
176
175
177
/**
176
178
* Add pending document abstract action
177
179
* @param string $actionType
178
180
* @param array $data
181
+ * @return mixed
179
182
*/
180
183
public function action ($ actionType , $ data = [])
181
184
{
@@ -198,8 +201,10 @@ public function action($actionType, $data = [])
198
201
$ this ->reset ();
199
202
200
203
if ($ this ->autocommitAfter > 0 && $ this ->operationCount >= $ this ->autocommitAfter ) {
201
- $ this ->commit ();
204
+ return $ this ->commit ();
202
205
}
206
+
207
+ return true ;
203
208
}
204
209
205
210
/**
You can’t perform that action at this time.
0 commit comments