acl/lib_acl_cpp/app/ndb/lib_global/driver_hsocket.h

79 lines
3.2 KiB
C
Raw Normal View History

#pragma once
2014-11-19 00:25:21 +08:00
#include "db_driver.h"
class driver_hsocket : public db_driver
{
public:
driver_hsocket(void);
virtual ~driver_hsocket(void);
/**
*
*
*
* @param dbname {const char*}
* @param tbl {const char* tbl}
* @param idx {const char* idx}
*
* @param idx_unique {bool}
* @param user {const char*}
* @param pass {const char*}
* @return {bool}
2014-11-19 00:25:21 +08:00
*/
virtual bool create(const char* dbname, const char* tbl,
const char* idx, bool idx_unique = false,
const char* user = NULL, const char* pass = NULL);
/**
*
* @param dbname {const char*}
* @param tbl {const char* tbl}
* @param idx {const char*}
* @param user {const char*}
* @param pass {const char*}
* @return {bool}
2014-11-19 00:25:21 +08:00
*/
virtual bool open(const char* dbname, const char*tbl, const char* idx,
const char* user = NULL, const char* pass = NULL);
/**
*
*
* @param idx_value {const char*} open
* @param data {cost void*}
* @param dlen {size_t} data
* @return {bool} false last_error()
2014-11-19 00:25:21 +08:00
*/
virtual bool set(const char* idx_value, const void* data, size_t dlen);
/**
*
* @param idx_value {const char*} open
* @return {db_result*}
* db_result
* NULL last_error()
2014-11-19 00:25:21 +08:00
*/
virtual db_result* get(const char* idx_value);
/**
*
* @param idx_value {const char*} open
* @return {bool} false last_error()
* affect_count()
2014-11-19 00:25:21 +08:00
*/
virtual bool del(const char* idx_value);
/**
* set/del get
*
* @return {int} >= 0
2014-11-19 00:25:21 +08:00
*/
virtual size_t affect_count() const;
/**
*
* @return {db_error_t}
2014-11-19 00:25:21 +08:00
*/
virtual db_error_t last_error() const;
};