mariadb.py 610 B

12345678910111213141516171819202122232425
  1. from .base import MariaDBIdentifierPreparer
  2. from .base import MySQLDialect
  3. class MariaDBDialect(MySQLDialect):
  4. is_mariadb = True
  5. supports_statement_cache = True
  6. name = "mariadb"
  7. preparer = MariaDBIdentifierPreparer
  8. def loader(driver):
  9. driver_mod = __import__(
  10. "sqlalchemy.dialects.mysql.%s" % driver
  11. ).dialects.mysql
  12. driver_cls = getattr(driver_mod, driver).dialect
  13. return type(
  14. "MariaDBDialect_%s" % driver,
  15. (
  16. MariaDBDialect,
  17. driver_cls,
  18. ),
  19. {"supports_statement_cache": True},
  20. )