File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,19 @@ public function quoteField($field);
60
60
* @param array $fields
61
61
* @return Builder\RunnableSelect
62
62
*/
63
- public function select (array $ fields = array () );
63
+ public function select (array $ fields = null );
64
64
65
65
/**
66
+ * @param array $fields
66
67
* @return Builder\RunnableInsert
67
68
*/
68
- public function insert ();
69
+ public function insert (array $ fields = null );
69
70
70
71
/**
72
+ * @param array $fields
71
73
* @return Builder\RunnableUpdate
72
74
*/
73
- public function update ();
75
+ public function update (array $ fields = null );
74
76
75
77
/**
76
78
* @return Builder\RunnableDelete
Original file line number Diff line number Diff line change @@ -187,24 +187,36 @@ public function quoteField($field) {
187
187
* @param array $fields
188
188
* @return RunnableSelect
189
189
*/
190
- public function select (array $ fields = array () ) {
190
+ public function select (array $ fields = null ) {
191
191
$ select = new RunnableSelect ($ this );
192
- $ select ->fields ($ fields );
192
+ if ($ fields !== null ) {
193
+ $ select ->fields ($ fields );
194
+ }
193
195
return $ select ;
194
196
}
195
197
196
198
/**
199
+ * @param array $fields
197
200
* @return Builder\RunnableInsert
198
201
*/
199
- public function insert () {
200
- return new Builder \RunnableInsert ($ this );
202
+ public function insert (array $ fields = null ) {
203
+ $ insert = new Builder \RunnableInsert ($ this );
204
+ if ($ fields !== null ) {
205
+ $ insert ->addAll ($ fields );
206
+ }
207
+ return $ insert ;
201
208
}
202
209
203
210
/**
211
+ * @param array $fields
204
212
* @return Builder\RunnableUpdate
205
213
*/
206
- public function update () {
207
- return new Builder \RunnableUpdate ($ this );
214
+ public function update (array $ fields = null ) {
215
+ $ update = new Builder \RunnableUpdate ($ this );
216
+ if ($ fields !== null ) {
217
+ $ update ->setAll ($ fields );
218
+ }
219
+ return $ update ;
208
220
}
209
221
210
222
/**
You can’t perform that action at this time.
0 commit comments