MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / __init__

Method __init__

tortoise/backends/oracle/client.py:43–59  ·  view source on GitHub ↗
(
        self,
        *,
        user: str,
        password: str,
        host: str,
        port: SupportsInt,
        driver: str,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

41 capabilities = Capabilities(dialect="oracle")
42
43 def __init__(
44 self,
45 *,
46 user: str,
47 password: str,
48 host: str,
49 port: SupportsInt,
50 driver: str,
51 **kwargs: Any,
52 ) -> None:
53 super().__init__(**kwargs)
54 self.user = user.upper()
55 self.password = password
56 dbq = f"{host}:{port}"
57 if self.database:
58 dbq += f"/{self.database}"
59 self.dsn = f"DRIVER={driver};DBQ={dbq};UID={user};PWD={password};"
60
61 def _in_transaction(self) -> TransactionContext:
62 return TransactionContextPooled(TransactionWrapper(self), self._pool_init_lock)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected