original_string: protected function clearData($table, $clearLinks = false)
      {
          if ($this->option('clear')) {
              $this->db->statement('SET FOREIGN_KEY_CHECKS=0;');
  
              $this->db->table($table)->truncate();
  
              if ($clearLinks) {
                  $this->db->table('table_links')->where('new_table', $table)->delete();
              }
  
              $this->db->statement('SET FOREIGN_KEY_CHECKS=1;');
          }
      }
code: protected function clearData($table, $clearLinks = false)
      {
          if ($this->option('clear')) {
              $this->db->statement('SET FOREIGN_KEY_CHECKS=0;');
  
              $this->db->table($table)->truncate();
  
              if ($clearLinks) {
                  $this->db->table('table_links')->where('new_table', $table)->delete();
              }
  
              $this->db->statement('SET FOREIGN_KEY_CHECKS=1;');
          }
      }
code_tokens: protected function clearData ( $ table , $ clearLinks = false ) { if ( $ this -> option ( 'clear' ) ) { $ this -> db -> statement ( 'SET FOREIGN_KEY_CHECKS=0;' ) ; $ this -> db -> table ( $ table ) -> truncate ( ) ; if ( $ clearLinks ) { $ this -> db -> table ( 'table_links' ) -> where ( 'new_table' , $ table ) -> delete ( ) ; } $ this -> db -> statement ( 'SET FOREIGN_KEY_CHECKS=1;' ) ; } }
docstring: If set, truncate the database table.
  
  @param string  $table
  @param boolean $clearLinks
docstring_tokens: If set truncate the database table .