original_string: public function get_row_format($table = null) {
          $rowformat = null;
          if (isset($table)) {
              $table = $this->mysqli->real_escape_string($table);
              $sql = "SELECT row_format
                        FROM INFORMATION_SCHEMA.TABLES
                       WHERE table_schema = DATABASE() AND table_name = '{$this->prefix}$table'";
          } else {
              if ($this->is_antelope_file_format_no_more_supported()) {
                  // Breaking change: Antelope file format support has been removed, only Barracuda.
                  $dbengine = $this->get_dbengine();
                  $supporteddbengines = array('InnoDB', 'XtraDB');
                  if (in_array($dbengine, $supporteddbengines)) {
                      $rowformat = 'Barracuda';
                  }
  
                  return $rowformat;
              }
  
              $sql = "SHOW VARIABLES LIKE 'innodb_file_format'";
          }
          $this->query_start($sql, NULL, SQL_QUERY_AUX);
          $result = $this->mysqli->query($sql);
          $this->query_end($result);
          if ($rec = $result->fetch_assoc()) {
              // MySQL 8 BC: information_schema.* returns the fields in upper case.
              $rec = array_change_key_case($rec, CASE_LOWER);
              if (isset($table)) {
                  $rowformat = $rec['row_format'];
              } else {
                  $rowformat = $rec['value'];
              }
          }
          $result->close();
  
          return $rowformat;
      }
code: public function get_row_format($table = null) {
          $rowformat = null;
          if (isset($table)) {
              $table = $this->mysqli->real_escape_string($table);
              $sql = "SELECT row_format
                        FROM INFORMATION_SCHEMA.TABLES
                       WHERE table_schema = DATABASE() AND table_name = '{$this->prefix}$table'";
          } else {
              if ($this->is_antelope_file_format_no_more_supported()) {
                  // Breaking change: Antelope file format support has been removed, only Barracuda.
                  $dbengine = $this->get_dbengine();
                  $supporteddbengines = array('InnoDB', 'XtraDB');
                  if (in_array($dbengine, $supporteddbengines)) {
                      $rowformat = 'Barracuda';
                  }
  
                  return $rowformat;
              }
  
              $sql = "SHOW VARIABLES LIKE 'innodb_file_format'";
          }
          $this->query_start($sql, NULL, SQL_QUERY_AUX);
          $result = $this->mysqli->query($sql);
          $this->query_end($result);
          if ($rec = $result->fetch_assoc()) {
              // MySQL 8 BC: information_schema.* returns the fields in upper case.
              $rec = array_change_key_case($rec, CASE_LOWER);
              if (isset($table)) {
                  $rowformat = $rec['row_format'];
              } else {
                  $rowformat = $rec['value'];
              }
          }
          $result->close();
  
          return $rowformat;
      }
code_tokens: public function get_row_format ( $ table = null ) { $ rowformat = null ; if ( isset ( $ table ) ) { $ table = $ this -> mysqli -> real_escape_string ( $ table ) ; $ sql = "SELECT row_format
                        FROM INFORMATION_SCHEMA.TABLES
                       WHERE table_schema = DATABASE() AND table_name = '{$this->prefix}$table'" ; } else { if ( $ this -> is_antelope_file_format_no_more_supported ( ) ) { // Breaking change: Antelope file format support has been removed, only Barracuda. $ dbengine = $ this -> get_dbengine ( ) ; $ supporteddbengines = array ( 'InnoDB' , 'XtraDB' ) ; if ( in_array ( $ dbengine , $ supporteddbengines ) ) { $ rowformat = 'Barracuda' ; } return $ rowformat ; } $ sql = "SHOW VARIABLES LIKE 'innodb_file_format'" ; } $ this -> query_start ( $ sql , NULL , SQL_QUERY_AUX ) ; $ result = $ this -> mysqli -> query ( $ sql ) ; $ this -> query_end ( $ result ) ; if ( $ rec = $ result -> fetch_assoc ( ) ) { // MySQL 8 BC: information_schema.* returns the fields in upper case. $ rec = array_change_key_case ( $ rec , CASE_LOWER ) ; if ( isset ( $ table ) ) { $ rowformat = $ rec [ 'row_format' ] ; } else { $ rowformat = $ rec [ 'value' ] ; } } $ result -> close ( ) ; return $ rowformat ; }
docstring: Get the row format from the database schema.
  
  @param string $table
  @return string row_format name or null if not known or table does not exist.
docstring_tokens: Get the row format from the database schema .