public static function transactional($fn)
    {
        $oosql = self::getInstance('oosql', 'void');
        if (!$oosql->beginTransaction()) {
            $msg = 'Could not start this transaction. BeginTransaction failed!';
            throw new \Exception($msg, 9815, null);
        }
        if (is_callable($fn)) {
            $ret = $fn($oosql);
            return $ret;
        }
        $msg = 'Please pass a Lamda function as a parameter to this method!';
        throw new \Exception($msg, 9816, null);
    }