cardinal_pythonlib.sqlalchemy.dialect
Original code copyright (C) 2009-2022 Rudolf Cardinal (rudolf@pobox.com).
This file is part of cardinal_pythonlib.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Helper functions relating to SQLAlchemy SQL dialects.
- class cardinal_pythonlib.sqlalchemy.dialect.SqlaDialectName[source]
Dialect names used by SQLAlchemy.
- cardinal_pythonlib.sqlalchemy.dialect.get_dialect(mixed: Engine | Dialect | Session | SQLCompiler) Dialect | type[source]
Finds the SQLAlchemy dialect in use.
- Parameters:
mixed¶ – An SQLAlchemy engine, bound session, SQLCompiler, or Dialect object.
Returns: the SQLAlchemy
Dialectbeing used
- cardinal_pythonlib.sqlalchemy.dialect.get_dialect_from_name(dialect_name: str) Dialect[source]
Creates a Dialect. Not very elegant.
- cardinal_pythonlib.sqlalchemy.dialect.get_dialect_name(mixed: Engine | Dialect | Session | SQLCompiler) str[source]
Finds the name of the SQLAlchemy dialect in use.
- Parameters:
mixed¶ – An SQLAlchemy engine, bound session, SQLCompiler, or Dialect object.
Returns: the SQLAlchemy dialect name being used
- cardinal_pythonlib.sqlalchemy.dialect.get_preparer(mixed: Engine | Dialect | Session | SQLCompiler) IdentifierPreparer[source]
Returns the SQLAlchemy
IdentifierPreparerin use for the dialect being used.- Parameters:
mixed¶ – An SQLAlchemy engine, bound session, SQLCompiler, or Dialect object.
Returns: an
IdentifierPreparer