code::w2psqlImpl Class Reference

List of all members.

Detailed Description

Implementation class included from code_PostgreSQLIndex.cc NOT meant to be used by anyone else, to limit dependence on libpq headers.

Author:
Lakshman
Version:
Id
code_w2psqlImpl.h,v 1.11 2009/06/02 20:17:39 lakshman Exp


Public Member Functions

 ~w2psqlImpl ()
 w2psqlImpl (const std::string &host="", const std::string &port="")
bool isValid () const
void listenTo (const std::string &tableName) const
size_t getAddedRecords (std::vector< Index::Record > &) const
bool startTransaction () const
bool executeQuery (const std::string &query_in, std::vector< std::vector< std::string > > &result, bool commit=false) const
void endTransaction () const
bool executeUpdate (const std::string &query, bool commit=false, bool asTransaction=false) const

Static Public Member Functions

static bool parseURL (const std::string &dburl, std::string &host, std::string &tableName, std::string &tablePath, std::string &seqName)
static std::string getUniqueTableName (const std::string &host, const std::string &fullName, const std::string &port="")
 A name like "/home/wdssii/data/KTLX/code_index.lb is mapped to a unique table name such as table_13 Users refer to the table using the full path, but SQL queries have to refer to things using the 32-byte name.


Constructor & Destructor Documentation

code::w2psqlImpl::~w2psqlImpl (  )  [inline]

code::w2psqlImpl::w2psqlImpl ( const std::string &  host = "",
const std::string &  port = "" 
) [inline]


Member Function Documentation

void code::w2psqlImpl::endTransaction (  )  const [inline]

bool code::w2psqlImpl::executeQuery ( const std::string &  query_in,
std::vector< std::vector< std::string > > &  result,
bool  commit = false 
) const [inline]

bool code::w2psqlImpl::executeUpdate ( const std::string &  query,
bool  commit = false,
bool  asTransaction = false 
) const [inline]

size_t code::w2psqlImpl::getAddedRecords ( std::vector< Index::Record > &   )  const [inline]

static std::string code::w2psqlImpl::getUniqueTableName ( const std::string &  host,
const std::string &  fullName,
const std::string &  port = "" 
) [inline, static]

A name like "/home/wdssii/data/KTLX/code_index.lb is mapped to a unique table name such as table_13 Users refer to the table using the full path, but SQL queries have to refer to things using the 32-byte name.

Because every host will have its own such table, the fullName should not include the machine name in it.

bool code::w2psqlImpl::isValid (  )  const [inline]

void code::w2psqlImpl::listenTo ( const std::string &  tableName  )  const [inline]

static bool code::w2psqlImpl::parseURL ( const std::string &  dburl,
std::string &  host,
std::string &  tableName,
std::string &  tablePath,
std::string &  seqName 
) [inline, static]

bool code::w2psqlImpl::startTransaction (  )  const [inline]


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7