diff --git a/system/db.php b/system/db.php index 283ca970..fbdcaf1f 100644 --- a/system/db.php +++ b/system/db.php @@ -94,4 +94,15 @@ public static function table($table, $connection = null) 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); + } + } \ No newline at end of file