|
@@ -65,7 +65,17 @@ class SQLHandler:
|
|
|
|
|
|
from libraries.configuration import default as cfg
|
|
from libraries.configuration import default as cfg
|
|
|
|
|
|
- db_uri = "{0}://{1}:{2}@{3}:{4}/{5}?charset=utf8&local_infile=1"\
|
|
|
|
|
|
+ if cfg["SQL"]["DRIVER"]:
|
|
|
|
+ db_uri = "{0}://{1}:{2}@{3}:{4}/{5}?driver={}&charset=utf8&local_infile=1"\
|
|
|
|
+ .format(cfg["SQL"]["SQL_DIALECT"],
|
|
|
|
+ cfg["SQL"]["SQL_USER"],
|
|
|
|
+ cfg["SQL"]["SQL_PASSWORD"],
|
|
|
|
+ cfg["SQL"]["SQL_HOST"],
|
|
|
|
+ cfg["SQL"]["SQL_PORT"],
|
|
|
|
+ cfg["SQL"]["SQL_DATABASE_NAME"],
|
|
|
|
+ cfg["SQL"]["DRIVER"])
|
|
|
|
+ else:
|
|
|
|
+ db_uri = "{0}://{1}:{2}@{3}:{4}/{5}?charset=utf8&local_infile=1"\
|
|
.format(cfg["SQL"]["SQL_DIALECT"],
|
|
.format(cfg["SQL"]["SQL_DIALECT"],
|
|
cfg["SQL"]["SQL_USER"],
|
|
cfg["SQL"]["SQL_USER"],
|
|
cfg["SQL"]["SQL_PASSWORD"],
|
|
cfg["SQL"]["SQL_PASSWORD"],
|