public function RunGenericQuery($sql)
{
$dataContext = \Swiftriver\Core\Setup::DALConfiguration()->DataContextType;
switch ($dataContext) {
case "\\Swiftriver\\Core\\Modules\\DataContext\\MySql_V2\\DataContext":
$db = \Swiftriver\Core\Modules\DataContext\MySql_V2\DataContext::PDOConnection();
$statement = $db->prepare($sql);
$result = $statement->execute();
return $result == false ? array("results" => array(), "errors" => $statement->errorInfo()) : array("results" => $statement->fetchAll(), "errors" => null);
}
}