Ejemplo n.º 1
0
 /* {{{ MySQL_ArtResultSet::rowsCount() -I- */
 size_t
 MySQL_ArtResultSet::rowsCount() const
 {
     CPP_ENTER("MySQL_ArtResultSet::rowsCount");
     checkValid();
     return static_cast<size_t>(num_rows);
 }
/* {{{ MySQL_PreparedResultSetMetaData::MySQL_PreparedResultSetMetaData -I- */
MySQL_PreparedResultSetMetaData::MySQL_PreparedResultSetMetaData(boost::shared_ptr< NativeAPI::NativeStatementWrapper > & _proxy,
																	boost::shared_ptr< MySQL_DebugLogger> & l)
	: proxy(_proxy), logger(l), result_meta( _proxy->result_metadata()),
		num_fields(_proxy->field_count())
{
	CPP_ENTER("MySQL_PreparedResultSetMetaData::MySQL_PreparedResultSetMetaData");
}
Ejemplo n.º 3
0
 /* {{{ MySQL_ArtResultSet::absolute() -I- */
 bool
 MySQL_ArtResultSet::absolute(const int row)
 {
     CPP_ENTER("MySQL_ArtResultSet::absolute");
     checkValid();
     if (row > 0) {
         if (row > (int) num_rows) {
             afterLast();
         }
         else {
             row_position = row;
             seek();
             return true;
         }
     }
     else if (row < 0) {
         if ((-row) > (int) num_rows) {
             beforeFirst();
         }
         else {
             row_position = num_rows - (-row)  + 1;
             seek();
             return true;
         }
     }
     else {
         /* According to the JDBC book, absolute(0) means before the result set */
         beforeFirst();
     }
     return (row_position > 0 && row_position < (num_rows + 1));
 }
Ejemplo n.º 4
0
 /* {{{ MySQL_ArtResultSet::~MySQL_ArtResultSet() -I- */
 MySQL_ArtResultSet::~MySQL_ArtResultSet()
 {
     CPP_ENTER("MySQL_ArtResultSet::~MySQL_ArtResultSet");
     if (!isClosed()) {
         close();
     }
 }
Ejemplo n.º 5
0
 /* {{{ MySQL_ArtResultSet::refreshRow() -U- */
 void
 MySQL_ArtResultSet::refreshRow()
 {
     CPP_ENTER("MySQL_ArtResultSet::refreshRow");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ResultSet::refreshRow()");
 }
/* {{{ MySQL_PreparedResultSetMetaData::getColumnCount -I- */
unsigned int
MySQL_PreparedResultSetMetaData::getColumnCount()
{
	CPP_ENTER("MySQL_PreparedResultSetMetaData::getColumnCount");
	CPP_INFO_FMT("this=%p", this);
	return num_fields;
}
Ejemplo n.º 7
0
 /* {{{ MySQL_ArtResultSet::cancelRowUpdates() -U- */
 void
 MySQL_ArtResultSet::cancelRowUpdates()
 {
     CPP_ENTER("MySQL_ArtResultSet::cancelRowUpdates");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::cancelRowUpdates()");
 }
Ejemplo n.º 8
0
 /* {{{ MySQL_ArtResultSet::setFetchSize() -U- */
 void
 MySQL_ArtResultSet::setFetchSize(size_t /* rows */)
 {
     CPP_ENTER("MySQL_ArtResultSet::setFetchSize");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ResultSet::rowDeleted()");
 }
Ejemplo n.º 9
0
 /* {{{ MySQL_ArtResultSet::getStatement() -I- */
 const Statement*
 MySQL_ArtResultSet::getStatement() const
 {
     CPP_ENTER("MySQL_ArtResultSet::getStatement");
     checkValid();
     return NULL; /* This is a constructed result set - no statement -> NULL */
 }
Ejemplo n.º 10
0
 /* {{{ MySQL_ArtResultSet::isAfterLast() -I- */
 bool
 MySQL_ArtResultSet::isAfterLast() const
 {
     CPP_ENTER("MySQL_ArtResultSet::isAfterLast");
     checkValid();
     return (row_position == num_rows + 1);
 }
Ejemplo n.º 11
0
 /* {{{ MySQL_ArtResultSet::isBeforeFirst() -I- */
 bool
 MySQL_ArtResultSet::isBeforeFirst() const
 {
     CPP_ENTER("MySQL_ArtResultSet::isBeforeFirst");
     checkValid();
     return (row_position == 0);
 }
Ejemplo n.º 12
0
 /* {{{ MySQL_ArtResultSet::getWarnings() -U- */
 void
 MySQL_ArtResultSet::getWarnings()
 {
     CPP_ENTER("MySQL_ArtResultSet::getWarnings");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::getWarnings()");
 }
Ejemplo n.º 13
0
 /* {{{ MySQL_ArtResultSet::getMetaData() -I- */
 sql::ResultSetMetaData*
 MySQL_ArtResultSet::getMetaData() const
 {
     CPP_ENTER("MySQL_ArtResultSet::getMetaData");
     checkValid();
     return meta.get();
 }
Ejemplo n.º 14
0
 /* {{{ MySQL_ArtResultSet::getType() -I- */
 sql::ResultSet::enum_type
 MySQL_ArtResultSet::getType() const
 {
     CPP_ENTER("MySQL_ArtResultSet::getType");
     checkValid();
     return sql::ResultSet::TYPE_SCROLL_INSENSITIVE;
 }
Ejemplo n.º 15
0
 /* {{{ MySQL_ArtResultSet::moveToCurrentRow() -U- */
 void
 MySQL_ArtResultSet::moveToCurrentRow()
 {
     CPP_ENTER("MySQL_ArtResultSet::moveToCurrentRow");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::moveToCurrentRow()");
 }
Ejemplo n.º 16
0
 /* {{{ MySQL_ArtResultSet::isLast() -I- */
 bool
 MySQL_ArtResultSet::isLast() const
 {
     CPP_ENTER("MySQL_ArtResultSet::isLast");
     checkValid();
     /* OR current_record == rs.end() */
     return (row_position == num_rows);
 }
Ejemplo n.º 17
0
 /* {{{ MySQL_ArtResultSet::isFirst() -I- */
 bool
 MySQL_ArtResultSet::isFirst() const
 {
     CPP_ENTER("MySQL_ArtResultSet::isFirst");
     checkValid();
     /* OR current_record == rs.begin() */
     return (row_position == 1);
 }
Ejemplo n.º 18
0
 /* {{{ MySQL_ArtResultSet::insertRow() -U- */
 void
 MySQL_ArtResultSet::insertRow()
 {
     CPP_ENTER("MySQL_ArtResultSet::insertRow");
     checkValid();
     /* TODO - We don't support inserting anyway */
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::insertRow()");
 }
Ejemplo n.º 19
0
 /* {{{ MySQL_ArtResultSet::beforeFirst() -I- */
 void
 MySQL_ArtResultSet::beforeFirst()
 {
     CPP_ENTER("MySQL_ArtResultSet::beforeFirst");
     checkValid();
     row_position = 0;
     seek();
 }
Ejemplo n.º 20
0
 /* {{{ MySQL_ArtResultSet::rowUpdated() -U- */
 bool
 MySQL_ArtResultSet::rowUpdated()
 {
     CPP_ENTER("MySQL_ArtResultSet::rowUpdated");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::rowUpdated()");
     return false; // This will shut up compilers
 }
Ejemplo n.º 21
0
 /* {{{ MySQL_ArtResultSet::getHoldability() -U- */
 int
 MySQL_ArtResultSet::getHoldability()
 {
     CPP_ENTER("MySQL_ArtResultSet::getHoldability");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::getHoldability()");
     return 0; // This will shut up compilers
 }
Ejemplo n.º 22
0
 /* {{{ MySQL_ArtResultSet::getFetchSize() -U- */
 size_t
 MySQL_ArtResultSet::getFetchSize()
 {
     CPP_ENTER("MySQL_ArtResultSet::getFetchSize");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::getFetchSize()");
     return 0; // This will shut up compilers
 }
Ejemplo n.º 23
0
 /* {{{ MySQL_ArtResultSet::getCursorName() -U- */
 SQLString
 MySQL_ArtResultSet::getCursorName()
 {
     CPP_ENTER("MySQL_ArtResultSet::getCursorName");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::getCursorName()");
     return 0; // This will shut up compilers
 }
Ejemplo n.º 24
0
 /* {{{ MySQL_ArtResultSet::close() -I- */
 void
 MySQL_ArtResultSet::close()
 {
     CPP_ENTER("MySQL_ArtResultSet::close");
     checkValid();
     //	delete [] field_index_to_name_map;
     is_closed = true;
 }
/* {{{ MySQL_ArtResultSetMetaData::getCatalogName() -I- */
std::string
MySQL_ArtResultSetMetaData::getCatalogName(unsigned int columnIndex)
{
	CPP_ENTER("MySQL_ArtResultSetMetaData::getCatalogName");
	CPP_INFO_FMT("this=%p", this);
	checkColumnIndex(columnIndex);
	return "";
}
Ejemplo n.º 26
0
 /* {{{ MySQL_ArtResultSet::afterLast() -I- */
 void
 MySQL_ArtResultSet::afterLast()
 {
     CPP_ENTER("MySQL_ArtResultSet::afterLast");
     checkValid();
     row_position = num_rows + 1;
     seek();
 }
Ejemplo n.º 27
0
 /* {{{ MySQL_ArtResultSet::getRow() -I- */
 size_t
 MySQL_ArtResultSet::getRow() const
 {
     CPP_ENTER("MySQL_ArtResultSet::getRow");
     checkValid();
     /* row_position is 0 based */
     return static_cast<size_t>(row_position);
 }
/* {{{ MySQL_ConstructedResultSetMetaData::getColumnCount() -I- */
unsigned int
MySQL_ConstructedResultSetMetaData::getColumnCount()
{
	CPP_ENTER("MySQL_ConstructedResultSetMetaData::getColumnCount");
	CPP_INFO_FMT("this=%p", this);
	CPP_INFO_FMT("column_count=%d", parent->num_fields);
	return parent->num_fields;
}
/* {{{ MySQL_ArtResultSetMetaData::getColumnCount() -I- */
unsigned int
MySQL_ArtResultSetMetaData::getColumnCount()
{
	CPP_ENTER("MySQL_ArtResultSetMetaData::getColumnCount");
	CPP_INFO_FMT("this=%p", this);
	CPP_INFO_FMT("column_count=%d", num_fields);
	return num_fields;
}
Ejemplo n.º 30
0
 /* {{{ MySQL_ArtResultSet::getRowId() -U- */
 sql::RowID*
 MySQL_ArtResultSet::getRowId(const sql::SQLString&)
 {
     CPP_ENTER("MySQL_ArtResultSet::getRowId");
     checkValid();
     throw sql::MethodNotImplementedException("MySQL_ArtResultSet::getRowId()");
     return NULL; // This will shut up compilers
 }