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

Sql fields query. More...

#include <query_sql_fields.h>

Public Member Functions

 SqlFieldsQuery (const std::string &sql)
 Constructor. More...
 
 SqlFieldsQuery (const std::string &sql, bool loc)
 Constructor. More...
 
 SqlFieldsQuery (const SqlFieldsQuery &other)
 Copy constructor. More...
 
SqlFieldsQueryoperator= (const SqlFieldsQuery &other)
 Assignment operator. More...
 
 ~SqlFieldsQuery ()
 Destructor.
 
void Swap (SqlFieldsQuery &other)
 Efficiently swaps contents with another SqlQuery instance. 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 IsEnforceJoinOrder () const
 Checks if join order of tables if enforced. More...
 
void SetEnforceJoinOrder (bool enforce)
 Sets flag to enforce join order of tables in the query. 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 Write (binary::BinaryRawWriter &writer) const
 Write query info to the stream. More...
 

Detailed Description

Sql fields query.

Constructor & Destructor Documentation

ignite::cache::query::SqlFieldsQuery::SqlFieldsQuery ( const std::string &  sql)
inline

Constructor.

Parameters
sqlSQL string.
ignite::cache::query::SqlFieldsQuery::SqlFieldsQuery ( const std::string &  sql,
bool  loc 
)
inline

Constructor.

Parameters
sqlSQL string.
locWhether query should be executed locally.
ignite::cache::query::SqlFieldsQuery::SqlFieldsQuery ( const SqlFieldsQuery other)
inline

Copy constructor.

Parameters
otherOther instance.

Member Function Documentation

template<typename T >
void ignite::cache::query::SqlFieldsQuery::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.
int32_t ignite::cache::query::SqlFieldsQuery::GetPageSize ( ) const
inline

Get page size.

Returns
Page size.
const std::string& ignite::cache::query::SqlFieldsQuery::GetSql ( ) const
inline

Get SQL string.

Returns
SQL string.
bool ignite::cache::query::SqlFieldsQuery::IsDistributedJoins ( ) const
inline

Check if distributed joins are enabled for this query.

Returns
True If distributed joind enabled.
bool ignite::cache::query::SqlFieldsQuery::IsEnforceJoinOrder ( ) const
inline

Checks if join order of tables if enforced.

Returns
Flag value.
bool ignite::cache::query::SqlFieldsQuery::IsLocal ( ) const
inline

Get local flag.

Returns
Local flag.
SqlFieldsQuery& ignite::cache::query::SqlFieldsQuery::operator= ( const SqlFieldsQuery other)
inline

Assignment operator.

Parameters
otherOther instance.
void ignite::cache::query::SqlFieldsQuery::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.
void ignite::cache::query::SqlFieldsQuery::SetEnforceJoinOrder ( bool  enforce)
inline

Sets flag to enforce join order of tables in the query.

If set to true query optimizer will not reorder tables in join. By default is false.

It is not recommended to enable this property unless you are sure that your indexes and the query itself are correct and tuned as much as possible but query optimizer still produces wrong join order.

Parameters
enforceFlag value.
void ignite::cache::query::SqlFieldsQuery::SetLocal ( bool  loc)
inline

Set local flag.

Parameters
locLocal flag.
void ignite::cache::query::SqlFieldsQuery::SetPageSize ( int32_t  pageSize)
inline

Set page size.

Parameters
pageSizePage size.
void ignite::cache::query::SqlFieldsQuery::SetSql ( const std::string &  sql)
inline

Set SQL string.

Parameters
sqlSQL string.
void ignite::cache::query::SqlFieldsQuery::Swap ( SqlFieldsQuery other)
inline

Efficiently swaps contents with another SqlQuery instance.

Parameters
otherOther instance.
void ignite::cache::query::SqlFieldsQuery::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: