API documentation for engine module.
Classes
AlloyDBEngine
AlloyDBEngine(
key: object,
pool: sqlalchemy.ext.asyncio.engine.AsyncEngine,
loop: typing.Optional[asyncio.events.AbstractEventLoop],
thread: typing.Optional[threading.Thread],
)A class for managing connections to a AlloyDB database.
Modules Functions
_columnar_column_list
_columnar_column_list(columns: list[str]) -> strBuild the columns argument of google_columnar_engine_add.
The server splits this string on , (and each entry on :), strips
whitespace and looks each name up verbatim with get_attnum; it does
not parse quoted identifiers. Names are therefore passed raw (as a bound
parameter), and names the format cannot represent are rejected.
_get_iam_principal_email
_get_iam_principal_email(credentials: google.auth.credentials.Credentials) -> strGet email address associated with current authenticated IAM principal.
Email will be used for automatic IAM database authentication to AlloyDB.
| Parameter | |
|---|---|
| Name | Description |
credentials |
google.auth.credentials.Credentials
The credentials object to use in finding the associated IAM principal email address. |
| Returns | |
|---|---|
| Type | Description |
email (str) |
The email address associated with the current authenticated IAM principal. |
_is_missing_object_error
_is_missing_object_error(error: BaseException, sqlstates: set[str]) -> boolReturn True if the DB-API error behind error has one of sqlstates.
Only the driver error (error.orig) is inspected. str(error) is never
matched because SQLAlchemy includes the SQL statement in it.
_quote_ident
_quote_ident(ident: str) -> strQuote a PostgreSQL identifier (doubling embedded double quotes).
_validate_field
_validate_field(value: typing.Any, name: str) -> NoneRaise ValueError unless value is a non-empty, non-blank string.