Granada\ORM::_detect_identifier_quote_character PHP Method

_detect_identifier_quote_character() protected static method

Return the correct character used to quote identifiers (table names, column names etc) by looking at the driver being used by PDO.
protected static _detect_identifier_quote_character ( string $connection_name ) : string
$connection_name string Which connection to use
return string
    protected static function _detect_identifier_quote_character($connection_name)
    {
        switch (self::get_db($connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME)) {
            case 'pgsql':
            case 'sqlsrv':
            case 'dblib':
            case 'mssql':
            case 'sybase':
            case 'firebird':
                return '"';
            case 'mysql':
            case 'sqlite':
            case 'sqlite2':
            default:
                return '`';
        }
    }
ORM