Apache Ignite C++
Public Member Functions | List of all members
ignite::cache::query::SqlQuery Class Reference

Sql query. More...

#include <query_sql.h>

Public Member Functions

 SqlQuery (const std::string &type, const std::string &sql)
 Constructor. More...
 
 SqlQuery (const SqlQuery &other)
 Copy constructor. More...
 
SqlQueryoperator= (const SqlQuery &other)
 Assignment operator. More...
 
 ~SqlQuery ()
 Destructor.
 
void Swap (SqlQuery &other)
 Efficiently swaps contents with another SqlQuery instance. More...
 
const std::string & GetType () const
 Get type name. More...
 
void SetType (const std::string &type)
 Set type name. More...
 
const std::string & GetSql () const
 Get SQL string. More...
 
void SetSql (const std::string &sql)
 Set SQL string. More...
 
int32_t GetPageSize () const
 Get page size. More...
 
void SetPageSize (int32_t pageSize)
 Set page size. More...
 
bool IsLocal () const
 Get local flag. More...
 
void SetLocal (bool loc)
 Set local flag. More...
 
bool IsDistributedJoins () const
 Check if distributed joins are enabled for this query. More...
 
void SetDistributedJoins (bool enabled)
 Specify if distributed joins are enabled for this query. More...
 
template<typename T >
void AddArgument (const T &arg)
 Add argument. More...
 
void ClearArguments ()
 Remove all added arguments.
 
void Write (binary::BinaryRawWriter &writer) const
 Write query info to the stream. More...
 

Detailed Description

Sql query.

Deprecated:
Will be removed in future releases. Use SqlFieldsQuery instead.

Constructor & Destructor Documentation

◆ SqlQuery() [1/2]

ignite::cache::query::SqlQuery::SqlQuery ( const std::string &  type,
const std::string &  sql 
)
inline

Constructor.

Parameters
typeType name.
sqlSQL string.

◆ SqlQuery() [2/2]

ignite::cache::query::SqlQuery::SqlQuery ( const SqlQuery other)
inline

Copy constructor.

Parameters
otherOther instance.

Member Function Documentation

◆ AddArgument()

template<typename T >
void ignite::cache::query::SqlQuery::AddArgument ( const T &  arg)
inline

Add argument.

Template argument type should be copy-constructable and assignable. Also BinaryType class template should be specialized for this type.

Parameters
argArgument.

◆ GetPageSize()

int32_t ignite::cache::query::SqlQuery::GetPageSize ( ) const
inline

Get page size.

Returns
Page size.

◆ GetSql()

const std::string& ignite::cache::query::SqlQuery::GetSql ( ) const
inline

Get SQL string.

Returns
SQL string.

◆ GetType()

const std::string& ignite::cache::query::SqlQuery::GetType ( ) const
inline

Get type name.

Returns
Type name.

◆ IsDistributedJoins()

bool ignite::cache::query::SqlQuery::IsDistributedJoins ( ) const
inline

Check if distributed joins are enabled for this query.

Returns
True If distributed joind enabled.

◆ IsLocal()

bool ignite::cache::query::SqlQuery::IsLocal ( ) const
inline

Get local flag.

Returns
Local flag.

◆ operator=()

SqlQuery& ignite::cache::query::SqlQuery::operator= ( const SqlQuery other)
inline

Assignment operator.

Parameters
otherOther instance.

◆ SetDistributedJoins()

void ignite::cache::query::SqlQuery::SetDistributedJoins ( bool  enabled)
inline

Specify if distributed joins are enabled for this query.

When disabled, join results will only contain colocated data (joins work locally). When enabled, joins work as expected, no matter how the data is distributed.

Parameters
enabledDistributed joins enabled.

◆ SetLocal()

void ignite::cache::query::SqlQuery::SetLocal ( bool  loc)
inline

Set local flag.

Parameters
valValue of the flag. If true, query will be executed only on local node, so only local entries will be returned as query result.

◆ SetPageSize()

void ignite::cache::query::SqlQuery::SetPageSize ( int32_t  pageSize)
inline

Set page size.

Parameters
pageSizePage size.

◆ SetSql()

void ignite::cache::query::SqlQuery::SetSql ( const std::string &  sql)
inline

Set SQL string.

Parameters
sqlSQL string.

◆ SetType()

void ignite::cache::query::SqlQuery::SetType ( const std::string &  type)
inline

Set type name.

Parameters
sqlType name.

◆ Swap()

void ignite::cache::query::SqlQuery::Swap ( SqlQuery other)
inline

Efficiently swaps contents with another SqlQuery instance.

Parameters
otherOther instance.

◆ Write()

void ignite::cache::query::SqlQuery::Write ( binary::BinaryRawWriter writer) const
inline

Write query info to the stream.

Parameters
writerWriter.

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