SQLDriver Class extending Object

/ The SQLDriver class is to be extended by all SQLDrivers you do not need to bother yourself with this unless you are wanting to create a SQLDriver of your own /

Class Methods

Constructs this SQLDriver

function __construct() : void

Connects to the SQL database based on the credentials provided.
This is to be extended by SQL drivers

function connect(string host, string username, string password, string database) : SQLConnection

Registers a SQLDriver into the system
Example usage: SQLDriver.registerDriver(driver_here);

function registerDriver(SQLDriver driver) : void

Returns the SQL driver with the given name
Example usage: SQLDriver.getDriver(driver_name);

function getDriver(string driver_name) : SQLDriver

Returns true if the driver with the given name is registered to the system
Example usage: SQLDriver.hasDriver(driver_name);

function hasDriver(string driver_name) : boolean

Executes the given SQL statement by providing a connection, statement and finialized query to this execute function.
You should not call this directly instead call execute() within the Statement and PreparedStatement classes
SQLDriver's implement this pure abstract method

function execute(SQLConnection connection, SQLStatement statement, string finalized_query) : void

Escapes a given string preventing SQL injection
Should be overrided by drivers and sql escape the provided value and return the escaped string

function escape(SQLConnction connection, string value) : string