Added "driver" method to System\DB.
This commit is contained in:
parent
0f8f3f347c
commit
2f7fa6687c
|
@ -94,4 +94,15 @@ public static function table($table, $connection = null)
|
||||||
return new DB\Query($table, $connection);
|
return new DB\Query($table, $connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the driver name for a database connection.
|
||||||
|
*
|
||||||
|
* @param string $connection
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function driver($connection = null)
|
||||||
|
{
|
||||||
|
return static::connection($connection)->getAttribute(\PDO::ATTR_DRIVER_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue