续--table.hpp

#ifndef TABLE_HPP
#define TABLE_HPP
#include <vector>
#include <map>
#include <string>

namespace sqlpp
{
  typedef std::vector<std::string> field_list;

  typedef std::map<int, std::string> row_digit;
  typedef std::map<std::string, std::string> row_string;
 
  class Table
  {
  public:
    Table(const std::string& create_cmd);
    virtual ~Table();
  
    std::vector<row_digit>& get_rows(void)throw();
    std::vector<row_string>& get_rows_index_string(void)throw();

    field_list&  get_fields(void)throw();

    const std::string& get_create_cmd(void)const throw();
    const std::vector<std::string>& get_update_cmds(void)const throw();
   
  protected:
  private:
    const Table& operator=(const Table& rh);
    Table(const Table& rh);

    void trans_to_digit(void)throw();//trans row index to digit
    void trans_to_string(void)throw();//trans row index to string
    //create,modify,update table sql cmd list;
    std::vector<std::string> _update_cmds;
    std::vector<row_digit> _rows;
    std::vector<row_string> _rows_string;
    field_list _fields;
    std::string _create_cmd;
    bool _index_is_string;
  };
};
#endif
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值