Hazelcast C++ Client
Hazelcast C++ Client Library
hazelcast::client::sql::sql_page Class Reference

A finite set of rows returned to the client. More...

#include <sql_page.h>

Classes

class  sql_row
 

Public Member Functions

 sql_page (std::vector< sql_column_type > column_types, std::vector< column > columns, bool last, std::shared_ptr< sql_row_metadata > row_metadata=nullptr)
 Constructs an sql_page from the response returned from the server. More...
 
const std::vector< sql_column_type > & column_types () const
 Returns the types of the columns in each row. More...
 
bool last () const
 
std::size_t column_count () const
 Returns the number of columns in each row. More...
 
std::size_t row_count () const
 Returns the number of rows in this page. More...
 
const std::vector< sql_row > & rows () const
 Returns the rows of this page. More...
 

Friends

class sql_result
 
class protocol::codec::builtin::sql_page_codec
 

Detailed Description

A finite set of rows returned to the client.

Definition at line 42 of file sql_page.h.

Constructor & Destructor Documentation

◆ sql_page()

hazelcast::client::sql::sql_page::sql_page ( std::vector< sql_column_type >  column_types,
std::vector< column >  columns,
bool  last,
std::shared_ptr< sql_row_metadata row_metadata = nullptr 
)

Constructs an sql_page from the response returned from the server.

Parameters
column_typesThe types of the columns in each row of the page.
columnsThe values of each column for all rows of the page.
lasttrue if this is the last page in \sql_result, false otherwise.
row_metadataThe metadata of the rows of the page.

Definition at line 879 of file sql.cpp.

883  : page_data_{ new page_data{ std::move(column_types),
884  std::move(columns),
885  std::move(row_metadata),
886  nullptr } }
887  , last_(last)
888 {
889 }
const std::vector< sql_column_type > & column_types() const
Returns the types of the columns in each row.
Definition: sql.cpp:902

Member Function Documentation

◆ column_count()

std::size_t hazelcast::client::sql::sql_page::column_count ( ) const

Returns the number of columns in each row.

Returns
the number of columns in each row.

Definition at line 914 of file sql.cpp.

915 {
916  return page_data_->column_count();
917 }

◆ column_types()

const std::vector< sql_column_type > & hazelcast::client::sql::sql_page::column_types ( ) const

Returns the types of the columns in each row.

Returns
the vector of column types in each row

Definition at line 902 of file sql.cpp.

903 {
904  return page_data_->column_types_;
905 }

◆ last()

bool hazelcast::client::sql::sql_page::last ( ) const
Returns
true if this is the last page of the sql_result, false otherwise

Definition at line 908 of file sql.cpp.

909 {
910  return last_;
911 }

◆ row_count()

std::size_t hazelcast::client::sql::sql_page::row_count ( ) const

Returns the number of rows in this page.

Returns
the number of rows in this page.

Definition at line 920 of file sql.cpp.

921 {
922  return page_data_->row_count();
923 }

◆ rows()

const std::vector< sql_page::sql_row > & hazelcast::client::sql::sql_page::rows ( ) const

Returns the rows of this page.

Returns
the vector of rows in this page.

Definition at line 926 of file sql.cpp.

927 {
928  return rows_;
929 }

The documentation for this class was generated from the following files: