code: protected function retrieveMapping($table)
      {
          $result = $this->connection->fetchAll(
              'SELECT
                 COLUMN_NAME,
                 ORDINAL_POSITION
               FROM
                 INFORMATION_SCHEMA.COLUMNS
               WHERE TABLE_NAME = ?',
              [$table]
          );
  
          if (empty($result)) {
              return false;
          }
  
          $columns = [];
  
          foreach ($result as $column) {
              $columns[$column['ORDINAL_POSITION']] = $column['COLUMN_NAME'];
          }
  
          return $columns;
      }
docs: Retrieves mapping from database.
  
  @param string $table
  
  @return array|bool