<?php defined('SYSPATH') or die('No direct access allowed.');

/**
 * This class overrides Kohana's Database
 *
 * @package    lnApp/Modifications
 * @category   Classes
 * @category   Helpers
 * @author     Deon George
 * @copyright  (c) 2010 Deon George
 * @license    http://dev.leenooks.net/license.html
 */
abstract class Database extends Kohana_Database {
	// Enable TSM SHOW commands
	const SHOW =  5;
	const SET  =  6;

	// We need to set our default database so that any internal calls to Database::instance() use the right database.
	public static function instance($name = NULL, array $config = NULL) {
		Database::$default = Kohana::$config->load('config')->client_type;

		return parent::instance($name,$config);
	}
}
?>