@@ -79,8 +79,6 @@ public function find($id, $columns = array())
7979 */
8080 public function getFresh ($ columns = array ())
8181 {
82- $ start = microtime (true );
83-
8482 // If no columns have been specified for the select statement, we will set them
8583 // here to either the passed columns, or the standard default of retrieving
8684 // all of the columns on the table using the "wildcard" column character.
@@ -161,11 +159,6 @@ public function getFresh($columns = array())
161159 // Execute aggregation
162160 $ results = $ this ->collection ->aggregate ($ pipeline );
163161
164- // Log query
165- $ this ->connection ->logQuery (
166- $ this ->from . '.aggregate( ' . json_encode ($ pipeline ) . ') ' ,
167- array (), $ this ->connection ->getElapsedTime ($ start ));
168-
169162 // Return results
170163 return $ results ['result ' ];
171164 }
@@ -179,11 +172,6 @@ public function getFresh($columns = array())
179172 // Execute distinct
180173 $ result = $ this ->collection ->distinct ($ column , $ wheres );
181174
182- // Log query
183- $ this ->connection ->logQuery (
184- $ this ->from . '.distinct(" ' . $ column . '", ' . json_encode ($ wheres ) . ') ' ,
185- array (), $ this ->connection ->getElapsedTime ($ start ));
186-
187175 return $ result ;
188176 }
189177
@@ -204,11 +192,6 @@ public function getFresh($columns = array())
204192 if ($ this ->offset ) $ cursor ->skip ($ this ->offset );
205193 if ($ this ->limit ) $ cursor ->limit ($ this ->limit );
206194
207- // Log query
208- $ this ->connection ->logQuery (
209- $ this ->from . '.find( ' . json_encode ($ wheres ) . ', ' . json_encode ($ columns ) . ') ' ,
210- array (), $ this ->connection ->getElapsedTime ($ start ));
211-
212195 // Return results as an array with numeric keys
213196 return iterator_to_array ($ cursor , false );
214197 }
@@ -327,8 +310,6 @@ public function whereBetween($column, array $values, $boolean = 'and', $not = fa
327310 */
328311 public function insert (array $ values )
329312 {
330- $ start = microtime (true );
331-
332313 // Since every insert gets treated like a batch insert, we will have to detect
333314 // if the user is inserting a single document or an array of documents.
334315 $ batch = true ;
@@ -347,11 +328,6 @@ public function insert(array $values)
347328 // Batch insert
348329 $ result = $ this ->collection ->batchInsert ($ values );
349330
350- // Log query
351- $ this ->connection ->logQuery (
352- $ this ->from . '.batchInsert( ' . json_encode ($ values ) . ') ' ,
353- array (), $ this ->connection ->getElapsedTime ($ start ));
354-
355331 return (1 == (int ) $ result ['ok ' ]);
356332 }
357333
@@ -364,15 +340,8 @@ public function insert(array $values)
364340 */
365341 public function insertGetId (array $ values , $ sequence = null )
366342 {
367- $ start = microtime (true );
368-
369343 $ result = $ this ->collection ->insert ($ values );
370344
371- // Log query
372- $ this ->connection ->logQuery (
373- $ this ->from . '.insert( ' . json_encode ($ values ) . ') ' ,
374- array (), $ this ->connection ->getElapsedTime ($ start ));
375-
376345 if (1 == (int ) $ result ['ok ' ])
377346 {
378347 if (!$ sequence )
@@ -467,16 +436,9 @@ public function pluck($column)
467436 */
468437 public function delete ($ id = null )
469438 {
470- $ start = microtime (true );
471-
472439 $ wheres = $ this ->compileWheres ();
473440 $ result = $ this ->collection ->remove ($ wheres );
474441
475- // Log query
476- $ this ->connection ->logQuery (
477- $ this ->from . '.remove( ' . json_encode ($ wheres ) . ') ' ,
478- array (), $ this ->connection ->getElapsedTime ($ start ));
479-
480442 if (1 == (int ) $ result ['ok ' ])
481443 {
482444 return $ result ['n ' ];
@@ -623,8 +585,6 @@ public function newQuery()
623585 */
624586 protected function performUpdate ($ query , array $ options = array ())
625587 {
626- $ start = microtime (true );
627-
628588 // Default options
629589 $ default = array ('multiple ' => true );
630590
@@ -634,11 +594,6 @@ protected function performUpdate($query, array $options = array())
634594 $ wheres = $ this ->compileWheres ();
635595 $ result = $ this ->collection ->update ($ wheres , $ query , $ options );
636596
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-
642597 if (1 == (int ) $ result ['ok ' ])
643598 {
644599 return $ result ['n ' ];
0 commit comments