Drizzled Public API Documentation

TransactionFileReader Class Reference

List of all members.

Public Member Functions

bool openFile (const std::string &filename, int start_pos=0)
bool getNextTransaction (drizzled::message::Transaction &transaction, uint32_t *checksum)
uint32_t checksumLastReadTransaction ()
std::string getErrorString ()

Private Attributes

int file
char * buffer
char * temp_buffer
uint32_t previous_length
std::string error
google::protobuf::io::ZeroCopyInputStream * raw_input

Detailed Description

Definition at line 32 of file transaction_file_reader.h.


Member Function Documentation

uint32_t TransactionFileReader::checksumLastReadTransaction ( )

Perform a checksum of the last read transaction message.

Definition at line 192 of file transaction_file_reader.cc.

std::string TransactionFileReader::getErrorString ( ) [inline]

Get the error message from the last failed operation.

Definition at line 71 of file transaction_file_reader.h.

bool TransactionFileReader::getNextTransaction ( drizzled::message::Transaction transaction,
uint32_t *  checksum 
)

Read in next Transaction message and checksum.

Note:
Error message will be "EOF" when end-of-file is reached.
Parameters:
transactionStorage for the Transaction message
checksumStorage for the checksum value
Return values:
trueSuccess
falseFailure or EOF

Definition at line 86 of file transaction_file_reader.cc.

bool TransactionFileReader::openFile ( const std::string &  filename,
int  start_pos = 0 
)

Open the given transaction log file.

Parameters:
filenameName of the file to open
start_posPosition within the file to begin reading
Return values:
trueSuccess
falseFailure

Definition at line 62 of file transaction_file_reader.cc.


The documentation for this class was generated from the following files: