Beamlib 3.1.1
This is the Beam C++ class library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BMysql Class Reference

A class to provide access to a MySQL database. More...

#include <BMysql.h>

Public Member Functions

 BMysql ()
 
 ~BMysql ()
 
BError open (BString hostName, BString dataBase, BString userName, BString password)
 
void close ()
 
BError get (BString table, BString where, BDictString &fields)
 
BError insert (BString table, BDictString fields, BUInt32 *id=0)
 
BError update (BString table, BUInt32 id, BDictString fields)
 
BError del (BString table, BUInt32 id)
 Delete record from table. More...
 
BError flush ()
 Flush all data to disk. More...
 
BString escapeString (BString str)
 Escapes special characters in the string. More...
 
BError query (BString cmd, BList< BDictString > &result)
 
MYSQL & db ()
 
void setDebug (int debug)
 

Detailed Description

A class to provide access to a MySQL database.

Constructor & Destructor Documentation

◆ BMysql()

BMysql::BMysql ( )

◆ ~BMysql()

BMysql::~BMysql ( )

Member Function Documentation

◆ open()

BError BMysql::open ( BString  hostName,
BString  dataBase,
BString  userName,
BString  password 
)

◆ close()

void BMysql::close ( )

◆ get()

BError BMysql::get ( BString  table,
BString  where,
BDictString fields 
)

◆ insert()

BError BMysql::insert ( BString  table,
BDictString  fields,
BUInt32 id = 0 
)

◆ update()

BError BMysql::update ( BString  table,
BUInt32  id,
BDictString  fields 
)

◆ del()

BError BMysql::del ( BString  table,
BUInt32  id 
)

Delete record from table.

◆ flush()

BError BMysql::flush ( )

Flush all data to disk.

◆ escapeString()

BString BMysql::escapeString ( BString  str)

Escapes special characters in the string.

◆ query()

BError BMysql::query ( BString  cmd,
BList< BDictString > &  result 
)

◆ db()

MYSQL & BMysql::db ( )

◆ setDebug()

void BMysql::setDebug ( int  debug)

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