31#ifndef MYSQLX_TABLE_CRUD_H 
   32#define MYSQLX_TABLE_CRUD_H 
   79  struct Table_insert_base
 
   80    : 
public Executable<Result, TableInsert>
 
  100  : 
public internal::Table_insert_base
 
  101  , internal::Table_insert_detail
 
  106  template <
class... Cols>
 
  110    add_columns(get_impl(), cols...);
 
  120      reset(internal::Crud_factory::mk_insert(table));
 
  125  TableInsert(
const internal::Table_insert_base &other)
 
  127    internal::Table_insert_base::operator=(other);
 
  132    internal::Table_insert_base::operator=(std::move(other));
 
  135  using internal::Table_insert_base::operator=;
 
  142      add_rows(get_impl(), row);
 
  153  template<
typename... Types>
 
  157      add_values(get_impl(), rest...);
 
  167  template<
typename Container>
 
  171      add_rows(get_impl(), cont);
 
  181  template<
typename It>
 
  185      add_rows(get_impl(), begin, end);
 
  195  template<
typename... Types>
 
  199      add_rows(get_impl(), first, rest...);
 
  207  using Table_insert_detail::Impl;
 
  211    return static_cast<Impl*
>(internal::Table_insert_base::get_impl());
 
  226  class Op_view_create_alter;
 
  228  struct Table_select_cmd
 
  232  struct Table_select_base
 
  233    : 
public Group_by < Having < Order_by < Limit < Offset< Bind_parameters<
 
  234        Set_lock< Table_select_cmd, common::Table_select_if >
 
  255  : 
public internal::Table_select_base
 
  256  , internal::Table_select_detail
 
  259  using Operation = Table_select_base;
 
  266      reset(internal::Crud_factory::mk_select(table));
 
  271  template <
typename...PROJ>
 
  276      add_proj(get_impl(), proj...);
 
  281  TableSelect(
const internal::Table_select_cmd &other)
 
  283    internal::Table_select_cmd::operator=(other);
 
  288    internal::Table_select_cmd::operator=(std::move(other));
 
  291  using internal::Table_select_cmd::operator=;
 
  302      get_impl()->set_where(
expr);
 
  310  using Impl = common::Table_select_if;
 
  314    return static_cast<Impl*
>(internal::Table_select_base::get_impl());
 
  319  friend internal::Op_view_create_alter;
 
  330  struct Table_update_cmd
 
  334  struct Table_update_base
 
  335    : 
public Order_by< Limit< Bind_parameters< Table_update_cmd > > >
 
  351  : 
public internal::Table_update_base
 
  353  using Operation = internal::Table_update_base;
 
  358      reset(internal::Crud_factory::mk_update(table));
 
  371  TableUpdate(
const internal::Table_update_cmd &other)
 
  373    internal::Table_update_cmd::operator=(other);
 
  378    internal::Table_update_cmd::operator=(std::move(other));
 
  381  using internal::Table_update_cmd::operator=;
 
  393      get_impl()->add_set(field, (
const common::Value&)val);
 
  406      get_impl()->set_where(
expr);
 
  414  using Impl = common::Table_update_if;
 
  418    return static_cast<Impl*
>(internal::Table_update_base::get_impl());
 
  433  struct Table_remove_cmd
 
  437  struct Table_remove_base
 
  438    : Order_by< Limit< Bind_parameters< Table_remove_cmd > > >
 
  453  : 
public internal::Table_remove_base
 
  455  using Operation = internal::Table_remove_base;
 
  460      reset(internal::Crud_factory::mk_remove(table));
 
  473  TableRemove(
const internal::Table_remove_cmd &other)
 
  475    internal::Table_remove_cmd::operator=(other);
 
  480    internal::Table_remove_cmd::operator=(std::move(other));
 
  483  using internal::Table_remove_cmd::operator=;
 
  492      get_impl()->set_where(
expr);
 
  500  using Impl = common::Table_remove_if;
 
  504    return static_cast<Impl*
>(internal::Table_remove_base::get_impl());
 
Represents an operation that can be executed.
Definition: executable.h:68
Represents a single row from a result that contains rows.
Definition: row.h:72
An operation which inserts rows into a table.
Definition: table_crud.h:102
virtual TableInsert & values(const Row &row)
Add the given row to the list of rows to be inserted.
Definition: table_crud.h:139
TableInsert & values(Types... rest)
Add a single row consisting of the specified values to the list of rows to be inserted.
Definition: table_crud.h:154
TableInsert & rows(const Row &first, Types... rest)
Add the given list of rows.
Definition: table_crud.h:196
TableInsert & rows(const It &begin, const It &end)
Add rows from a range given by two iterators.
Definition: table_crud.h:182
TableInsert & rows(const Container &cont)
Add rows from a container such as vector or list.
Definition: table_crud.h:168
An operation which removes rows from a table.
Definition: table_crud.h:454
Operation & where(const string &expr)
Specify selection criteria for rows to be removed.
Definition: table_crud.h:489
An operation which selects rows from a table.
Definition: table_crud.h:257
Operation & where(const string &expr)
Specify row selection criteria.
Definition: table_crud.h:299
An operation which updates rows stored in a table.
Definition: table_crud.h:352
Operation & where(const string &expr)
Specify selection criteria for rows that should be updated.
Definition: table_crud.h:403
TableUpdate & set(const string &field, const Value &val)
Set the given field in a row to the given value.
Definition: table_crud.h:390
Represents a table in a schema.
Definition: xdevapi.h:1375
Value object can store value of scalar type, string, array or document.
Definition: document.h:230
Details for public API classes representing CRUD operations.
Class representing executable statements.
internal::Expression expr(std::string &&e)
Function which indicates that a given string should be treated as expression.
Definition: document.h:639
Classes used to access query and command execution results.