Repository: apache/arrow
File: cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_statement.h (C/C++)

Code before:
   */
  bool Fetch(size_t rows);
  bool IsPrepared() const;

  void GetStmtAttr(SQLINTEGER statement_attribute, SQLPOINTER output,
                   SQLINTEGER buffer_size, SQLINTEGER* str_len_ptr, bool is_unicode);
  void SetStmtAttr(SQLINTEGER statement_attribute, SQLPOINTER value,
                   SQLINTEGER buffer_size, bool is_unicode);

  void RevertAppDescriptor(bool is_apd);

  inline ODBCDescriptor* GetIRD() { return ird_.get(); }

  inline ODBCDescriptor* GetARD() { return current_ard_; }

  inline SQLULEN GetRowsetSize() { return rowset_size_; }

  bool GetData(SQLSMALLINT record_number, SQLSMALLINT c_type, SQLPOINTER data_ptr,
               SQLLEN buffer_length, SQLLEN* indicator_ptr);

  /// \brief Return number of columns from data set
  void GetColumnCount(SQLSMALLINT* column_count_ptr);

  /**
   * @brief Closes the cursor. This does _not_ un-prepare the statement or change
   * bindings.
   */
  void CloseCursor(bool suppress_errors);

  /**
   * @brief Releases this statement from memory.
   */
  void ReleaseStatement();

  void GetTables(const std::string* catalog, const std::string* schema,
                 const std::string* table, const std::string* table_type);
  void GetColumns(const std::string* catalog, const std::string* schema,
                  const std::string* table, const std::string* column);
  void GetTypeInfo(SQLSMALLINT data_type);
  void Cancel();

 private:
  ODBCConnection& connection_;
  std::shared_ptr<arrow::flight::sql::odbc::Statement> spi_statement_;
  std::shared_ptr<arrow::flight::sql::odbc::ResultSet> current_result_;
  arrow::flight::sql::odbc::Diagnostics* diagnostics_;

  std::shared_ptr<ODBCDescriptor> built_in_ard_;
  std::shared_ptr<ODBCDescriptor> built_in_apd_;
  std::shared_ptr<ODBCDescriptor> ipd_;
  std::shared_ptr<ODBCDescriptor> ird_;

Review comment (suggestion):
The other `@brief` usages will be changed in their respective PRs

Code after:
  bool IsPrepared() const;

  void GetStmtAttr(SQLINTEGER statement_attribute, SQLPOINTER output,
                   SQLINTEGER buffer_size, SQLINTEGER* str_len_ptr, bool is_unicode);
  void SetStmtAttr(SQLINTEGER statement_attribute, SQLPOINTER value,
                   SQLINTEGER buffer_size, bool is_unicode);

  void RevertAppDescriptor(bool is_apd);

  inline ODBCDescriptor* GetIRD() { return ird_.get(); }

  inline ODBCDescriptor* GetARD() { return current_ard_; }

  inline SQLULEN GetRowsetSize() { return rowset_size_; }

  SQLRETURN GetData(SQLSMALLINT record_number, SQLSMALLINT c_type, SQLPOINTER data_ptr,
                    SQLLEN buffer_length, SQLLEN* indicator_ptr);

  /// \brief Return number of columns from data set
  void GetColumnCount(SQLSMALLINT* column_count_ptr);

  /// \brief Return number of rows affected by an UPDATE, INSERT, or DELETE statement\
  ///
  ///  -1 is returned as driver only supports SELECT statement
  void GetRowCount(SQLLEN* row_count_ptr);

  /// \brief Closes the cursor. This does _not_ un-prepare the statement or change
  /// bindings.
  void CloseCursor(bool suppress_errors);

  /// \brief Releases this statement from memory.
  void ReleaseStatement();

  void GetTables(const std::string* catalog, const std::string* schema,
                 const std::string* table, const std::string* table_type);
  void GetColumns(const std::string* catalog, const std::string* schema,
                  const std::string* table, const std::string* column);
  void GetTypeInfo(SQLSMALLINT data_type);
  void Cancel();

 private:
  ODBCConnection& connection_;
  std::shared_ptr<arrow::flight::sql::odbc::Statement> spi_statement_;
  std::shared_ptr<arrow::flight::sql::odbc::ResultSet> current_result_;
  arrow::flight::sql::odbc::Diagnostics* diagnostics_;

  std::shared_ptr<ODBCDescriptor> built_in_ard_;
  std::shared_ptr<ODBCDescriptor> built_in_apd_;
  std::shared_ptr<ODBCDescriptor> ipd_;
  std::shared_ptr<ODBCDescriptor> ird_;
  ODBCDescriptor* current_ard_;