CORE POS - Fannie
The CORE POS back end
Static Public Member Functions | List of all members
FannieDB Class Reference

Static Public Member Functions

static get ($db_name, &$previous_db=null)
 
static forceReconnect ($db_name)
 
static getReadOnly ($db_name)
 

Detailed Description

Object for getting database connections. Singleton pattern so there's only one instance of SQLManager.

Member Function Documentation

static FannieDB::forceReconnect (   $db_name)
static

This method exists to support unit testing where test runs that take several minutes may run into issues with the single database connection timing out.

static FannieDB::get (   $db_name,
$previous_db = null 
)
static

Get a database connection

Parameters
$db_namethe database name
Returns
A connected SQLManager instance
static FannieDB::getReadOnly (   $db_name)
static

Get a read-only database connection

Parameters
$db_namethe database name

Unlike the normal get() method which returns a connection to the master database server, multiple read-only databases might be available. Load balancing among them is simply random.


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