tinySQL  0.1
A self-contained database management system
All Classes Files Functions Variables Pages
Public Member Functions | List of all members
Interface Class Reference

The interface of the entire database. More...

#include <interface.h>

Public Member Functions

 Interface (std::istream &is, std::ostream &os)
 Construct a new Interface object. More...
 
void run ()
 Should be called after initialized. More...
 
void showErrMsg (db_err_t &dbErr)
 Display the error message thrown. More...
 
void serialOutput (std::vector< MemoryTuple > &tuples)
 Serialize the records to a standard output. More...
 
void serialOutput (std::vector< MemoryTuple > &tuples, std::vector< std::string > &attr_names)
 Serialize the records and their attributes to a standard output. More...
 

Detailed Description

The interface of the entire database.

Definition at line 16 of file interface.h.

Constructor & Destructor Documentation

◆ Interface()

Interface::Interface ( std::istream &  is,
std::ostream &  os 
)
inline

Construct a new Interface object.

Parameters
isInput stream of database
osOutput stream of database

Definition at line 24 of file interface.h.

Member Function Documentation

◆ run()

void Interface::run ( )

Should be called after initialized.

Definition at line 128 of file interface.cpp.

Here is the call graph for this function:

◆ serialOutput() [1/2]

void Interface::serialOutput ( std::vector< MemoryTuple > &  tuples)

Serialize the records to a standard output.

Parameters
tuples[in]Records to be serialized

Definition at line 361 of file interface.cpp.

Here is the caller graph for this function:

◆ serialOutput() [2/2]

void Interface::serialOutput ( std::vector< MemoryTuple > &  tuples,
std::vector< std::string > &  attr_names 
)

Serialize the records and their attributes to a standard output.

Parameters
tuples[in] Records to be serialized
attr_names[in] Attributes to the records

Definition at line 371 of file interface.cpp.

◆ showErrMsg()

void Interface::showErrMsg ( db_err_t &  dbErr)

Display the error message thrown.

Parameters
dbErr[in] The error details

Definition at line 59 of file interface.cpp.

Here is the caller graph for this function:

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