SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::client::SQL Namespace Reference

The SWC-DB SQL C++ namespace 'SWC::client::SQL'. More...

Classes

class  ColumnList
 
class  ColumnSchema
 
class  QuerySelect
 
class  QueryUpdate
 
class  Reader
 

Enumerations

enum  ColumnOutputFlag : uint8_t { ONLY_CID = 0x01 }
 
enum  Cmd : uint8_t {
  UNKNOWN = 0,
  CREATE_COLUMN = 1,
  MODIFY_COLUMN = 2,
  REMOVE_COLUMN = 3,
  GET_COLUMNS = 4,
  COMPACT_COLUMNS = 5,
  SELECT = 6,
  UPDATE = 7
}
 

Functions

Cmd recognize_cmd (int &err, const std::string &sql, std::string &message)
 
void parse_select (int &err, const Clients::Ptr &clients, const std::string &sql, DB::Specs::Scan &specs, uint8_t &display_flags, std::string &message)
 
void parse_update (int &err, const std::string &sql, const Query::Update::Handlers::BaseUnorderedMap::Ptr &hdlr, uint8_t &display_flags, std::string &message)
 
void parse_list_columns (int &err, const Clients::Ptr &clients, const std::string &sql, DB::SchemasVec &schemas, std::string &message, const char *expect_cmd)
 
void parse_list_columns (int &err, const Clients::Ptr &clients, const std::string &sql, DB::SchemasVec &schemas, Comm::Protocol::Mngr::Params::ColumnListReq &params, std::string &message, const char *expect_cmd)
 
void parse_list_columns (int &err, const Clients::Ptr &clients, const std::string &sql, DB::SchemasVec &schemas, Comm::Protocol::Mngr::Params::ColumnListReq &params, uint8_t &output_flags, std::string &message, const char *expect_cmd)
 
void parse_column_schema (int &err, const std::string &sql, Comm::Protocol::Mngr::Params::ColumnMng::Function func, DB::Schema::Ptr &schema, std::string &message)
 
void parse_column_schema (int &err, const std::string &sql, Comm::Protocol::Mngr::Params::ColumnMng::Function *func, DB::Schema::Ptr &schema, std::string &message)
 
void parse_dump (int &err, const Clients::Ptr &clients, const std::string &sql, std::string &fs, std::string &filepath, uint64_t &split_size, std::string &ext, int &level, DB::Specs::Scan &specs, uint8_t &output_flags, uint8_t &display_flags, std::string &message)
 
void parse_load (int &err, const std::string &sql, const Query::Update::Handlers::BaseUnorderedMap::Ptr &hdlr, std::string &fs, std::string &filepath, cid_t &cid, uint8_t &display_flags, std::string &message)
 

Detailed Description

The SWC-DB SQL C++ namespace 'SWC::client::SQL'.

Enumeration Type Documentation

◆ Cmd

enum SWC::client::SQL::Cmd : uint8_t
Enumerator
UNKNOWN 
CREATE_COLUMN 
MODIFY_COLUMN 
REMOVE_COLUMN 
GET_COLUMNS 
COMPACT_COLUMNS 
SELECT 
UPDATE 

Definition at line 33 of file SQL.h.

◆ ColumnOutputFlag

Enumerator
ONLY_CID 

Definition at line 17 of file ColumnList.h.

Function Documentation

◆ parse_column_schema() [1/2]

void SWC::client::SQL::parse_column_schema ( int &  err,
const std::string &  sql,
Comm::Protocol::Mngr::Params::ColumnMng::Function func,
DB::Schema::Ptr schema,
std::string &  message 
)

Definition at line 134 of file SQL.cc.

References SWC::client::SQL::ColumnSchema::parse().

+ Here is the call graph for this function:

◆ parse_column_schema() [2/2]

void SWC::client::SQL::parse_column_schema ( int &  err,
const std::string &  sql,
Comm::Protocol::Mngr::Params::ColumnMng::Function  func,
DB::Schema::Ptr schema,
std::string &  message 
)

Definition at line 126 of file SQL.cc.

References SWC::client::SQL::ColumnSchema::parse().

Referenced by SWC::ThriftBroker::AppHandler::sql_mng_column().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_dump()

void SWC::client::SQL::parse_dump ( int &  err,
const Clients::Ptr clients,
const std::string &  sql,
std::string &  fs,
std::string &  filepath,
uint64_t &  split_size,
std::string &  ext,
int &  level,
DB::Specs::Scan specs,
uint8_t &  output_flags,
uint8_t &  display_flags,
std::string &  message 
)

Definition at line 142 of file SQL.cc.

References SWC::Common::Files::Schema::filepath(), SWC::client::SQL::QuerySelect::parse_display_flags(), SWC::client::SQL::QuerySelect::parse_dump(), and SWC::client::SQL::QuerySelect::parse_output_flags().

+ Here is the call graph for this function:

◆ parse_list_columns() [1/3]

void SWC::client::SQL::parse_list_columns ( int &  err,
const Clients::Ptr clients,
const std::string &  sql,
DB::SchemasVec schemas,
Comm::Protocol::Mngr::Params::ColumnListReq params,
std::string &  message,
const char *  expect_cmd 
)

◆ parse_list_columns() [2/3]

void SWC::client::SQL::parse_list_columns ( int &  err,
const Clients::Ptr clients,
const std::string &  sql,
DB::SchemasVec schemas,
Comm::Protocol::Mngr::Params::ColumnListReq params,
uint8_t &  output_flags,
std::string &  message,
const char *  expect_cmd 
)

◆ parse_list_columns() [3/3]

void SWC::client::SQL::parse_list_columns ( int &  err,
const Clients::Ptr clients,
const std::string &  sql,
DB::SchemasVec schemas,
std::string &  message,
const char *  expect_cmd 
)

Definition at line 92 of file SQL.cc.

References SWC::client::SQL::ColumnList::parse_list_columns().

Referenced by SWC::ThriftBroker::AppHandler::get_schemas().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_load()

void SWC::client::SQL::parse_load ( int &  err,
const std::string &  sql,
const Query::Update::Handlers::BaseUnorderedMap::Ptr hdlr,
std::string &  fs,
std::string &  filepath,
cid_t cid,
uint8_t &  display_flags,
std::string &  message 
)

Definition at line 157 of file SQL.cc.

References SWC::Common::Files::Schema::filepath(), SWC::client::SQL::QueryUpdate::parse_display_flags(), and SWC::client::SQL::QueryUpdate::parse_load().

+ Here is the call graph for this function:

◆ parse_select()

void SWC::client::SQL::parse_select ( int &  err,
const Clients::Ptr clients,
const std::string &  sql,
DB::Specs::Scan specs,
uint8_t &  display_flags,
std::string &  message 
)

Definition at line 73 of file SQL.cc.

References SWC::client::SQL::QuerySelect::parse_display_flags(), and SWC::client::SQL::QuerySelect::parse_select().

Referenced by SWC::ThriftBroker::AppHandler::sync_select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_update()

void SWC::client::SQL::parse_update ( int &  err,
const std::string &  sql,
const Query::Update::Handlers::BaseUnorderedMap::Ptr hdlr,
uint8_t &  display_flags,
std::string &  message 
)

Definition at line 83 of file SQL.cc.

References SWC::client::SQL::QueryUpdate::parse_display_flags(), and SWC::client::SQL::QueryUpdate::parse_update().

Referenced by SWC::ThriftBroker::AppHandler::sql_update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recognize_cmd()

Cmd SWC::client::SQL::recognize_cmd ( int &  err,
const std::string &  sql,
std::string &  message 
)

Definition at line 14 of file SQL.cc.

References COMPACT_COLUMNS, CREATE_COLUMN, GET_COLUMNS, MODIFY_COLUMN, REMOVE_COLUMN, SELECT, SWC::Error::SQL_PARSE_ERROR, SWC::Condition::str_eq(), SWC::DB::Cell::Serial::Value::UNKNOWN, and UPDATE.

Referenced by SWC::ThriftBroker::AppHandler::exec_sql().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: