@@ -79,8 +79,6 @@ public function find($id, $columns = array())
79
79
*/
80
80
public function getFresh ($ columns = array ())
81
81
{
82
- $ start = microtime (true );
83
-
84
82
// If no columns have been specified for the select statement, we will set them
85
83
// here to either the passed columns, or the standard default of retrieving
86
84
// all of the columns on the table using the "wildcard" column character.
@@ -161,11 +159,6 @@ public function getFresh($columns = array())
161
159
// Execute aggregation
162
160
$ results = $ this ->collection ->aggregate ($ pipeline );
163
161
164
- // Log query
165
- $ this ->connection ->logQuery (
166
- $ this ->from . '.aggregate( ' . json_encode ($ pipeline ) . ') ' ,
167
- array (), $ this ->connection ->getElapsedTime ($ start ));
168
-
169
162
// Return results
170
163
return $ results ['result ' ];
171
164
}
@@ -179,11 +172,6 @@ public function getFresh($columns = array())
179
172
// Execute distinct
180
173
$ result = $ this ->collection ->distinct ($ column , $ wheres );
181
174
182
- // Log query
183
- $ this ->connection ->logQuery (
184
- $ this ->from . '.distinct(" ' . $ column . '", ' . json_encode ($ wheres ) . ') ' ,
185
- array (), $ this ->connection ->getElapsedTime ($ start ));
186
-
187
175
return $ result ;
188
176
}
189
177
@@ -204,11 +192,6 @@ public function getFresh($columns = array())
204
192
if ($ this ->offset ) $ cursor ->skip ($ this ->offset );
205
193
if ($ this ->limit ) $ cursor ->limit ($ this ->limit );
206
194
207
- // Log query
208
- $ this ->connection ->logQuery (
209
- $ this ->from . '.find( ' . json_encode ($ wheres ) . ', ' . json_encode ($ columns ) . ') ' ,
210
- array (), $ this ->connection ->getElapsedTime ($ start ));
211
-
212
195
// Return results as an array with numeric keys
213
196
return iterator_to_array ($ cursor , false );
214
197
}
@@ -327,8 +310,6 @@ public function whereBetween($column, array $values, $boolean = 'and', $not = fa
327
310
*/
328
311
public function insert (array $ values )
329
312
{
330
- $ start = microtime (true );
331
-
332
313
// Since every insert gets treated like a batch insert, we will have to detect
333
314
// if the user is inserting a single document or an array of documents.
334
315
$ batch = true ;
@@ -347,11 +328,6 @@ public function insert(array $values)
347
328
// Batch insert
348
329
$ result = $ this ->collection ->batchInsert ($ values );
349
330
350
- // Log query
351
- $ this ->connection ->logQuery (
352
- $ this ->from . '.batchInsert( ' . json_encode ($ values ) . ') ' ,
353
- array (), $ this ->connection ->getElapsedTime ($ start ));
354
-
355
331
return (1 == (int ) $ result ['ok ' ]);
356
332
}
357
333
@@ -364,15 +340,8 @@ public function insert(array $values)
364
340
*/
365
341
public function insertGetId (array $ values , $ sequence = null )
366
342
{
367
- $ start = microtime (true );
368
-
369
343
$ result = $ this ->collection ->insert ($ values );
370
344
371
- // Log query
372
- $ this ->connection ->logQuery (
373
- $ this ->from . '.insert( ' . json_encode ($ values ) . ') ' ,
374
- array (), $ this ->connection ->getElapsedTime ($ start ));
375
-
376
345
if (1 == (int ) $ result ['ok ' ])
377
346
{
378
347
if (!$ sequence )
@@ -467,16 +436,9 @@ public function pluck($column)
467
436
*/
468
437
public function delete ($ id = null )
469
438
{
470
- $ start = microtime (true );
471
-
472
439
$ wheres = $ this ->compileWheres ();
473
440
$ result = $ this ->collection ->remove ($ wheres );
474
441
475
- // Log query
476
- $ this ->connection ->logQuery (
477
- $ this ->from . '.remove( ' . json_encode ($ wheres ) . ') ' ,
478
- array (), $ this ->connection ->getElapsedTime ($ start ));
479
-
480
442
if (1 == (int ) $ result ['ok ' ])
481
443
{
482
444
return $ result ['n ' ];
@@ -623,8 +585,6 @@ public function newQuery()
623
585
*/
624
586
protected function performUpdate ($ query , array $ options = array ())
625
587
{
626
- $ start = microtime (true );
627
-
628
588
// Default options
629
589
$ default = array ('multiple ' => true );
630
590
@@ -634,11 +594,6 @@ protected function performUpdate($query, array $options = array())
634
594
$ wheres = $ this ->compileWheres ();
635
595
$ result = $ this ->collection ->update ($ wheres , $ query , $ options );
636
596
637
- // Log query
638
- $ this ->connection ->logQuery (
639
- $ this ->from . '.update( ' . json_encode ($ wheres ) . ', ' . json_encode ($ query ) . ', ' . json_encode ($ options ) . ') ' ,
640
- array (), $ this ->connection ->getElapsedTime ($ start ));
641
-
642
597
if (1 == (int ) $ result ['ok ' ])
643
598
{
644
599
return $ result ['n ' ];
0 commit comments