original_string: public function delete_records($table, array $conditions=null) {
          // truncate is drop/create (DDL), not transactional safe,
          // so we don't use the shortcut within them. MDL-29198
          if (is_null($conditions) && empty($this->transactions)) {
              return $this->execute("TRUNCATE TABLE {".$table."}");
          }
          list($select, $params) = $this->where_clause($table, $conditions);
          return $this->delete_records_select($table, $select, $params);
      }
code: public function delete_records($table, array $conditions=null) {
          // truncate is drop/create (DDL), not transactional safe,
          // so we don't use the shortcut within them. MDL-29198
          if (is_null($conditions) && empty($this->transactions)) {
              return $this->execute("TRUNCATE TABLE {".$table."}");
          }
          list($select, $params) = $this->where_clause($table, $conditions);
          return $this->delete_records_select($table, $select, $params);
      }
code_tokens: public function delete_records ( $ table , array $ conditions = null ) { // truncate is drop/create (DDL), not transactional safe, // so we don't use the shortcut within them. MDL-29198 if ( is_null ( $ conditions ) && empty ( $ this -> transactions ) ) { return $ this -> execute ( "TRUNCATE TABLE {" . $ table . "}" ) ; } list ( $ select , $ params ) = $ this -> where_clause ( $ table , $ conditions ) ; return $ this -> delete_records_select ( $ table , $ select , $ params ) ; }
docstring: Delete the records from a table where all the given conditions met.
  If conditions not specified, table is truncated.
  
  @param string $table the table to delete from.
  @param array $conditions optional array $fieldname=>requestedvalue with AND in between
  @return bool true.
  @throws dml_exception A DML specific exception is thrown for any errors.
docstring_tokens: Delete the records from a table where all the given conditions met . If conditions not specified table is truncated .