LSST Applications g011c388f00+c533e7e796,g0265f82a02+71b8ded0d6,g16a3bce237+71b8ded0d6,g2079a07aa2+b9108c1c87,g2bbee38e9b+71b8ded0d6,g337abbeb29+71b8ded0d6,g3ddfee87b4+efeeb9cceb,g44050f54f7+816a004954,g4cf46543a9+ac9bf1619d,g50ff169b8f+8309cf5058,g52b1c1532d+43dac7135f,g858d7b2824+816a004954,g8a8a8dda67+43dac7135f,g99855d9996+36230435de,g9cb17f706c+56afb287bb,g9ddcbc5298+389b8f2b7e,ga1e77700b3+4bafba478f,ga8c6da7877+9a92598c84,gae46bcf261+71b8ded0d6,gb0e22166c9+713927f999,gb700894bec+0b6c79d923,gb8350603e9+a03320826c,gba4ed39666+e464e2e6f0,gbeb006f7da+8cd302297b,gc86a011abf+816a004954,gcf0d15dbbd+efeeb9cceb,gd0e876f1fb+efeeb9cceb,gd162630629+3eacc90e0c,gd44f2fa1a7+82b768a15d,gd8a3c24633+eaa4ad6639,gdaeeff99f8+6b435c3f92,ge2eec9bf53+fad368631c,ge79ae78c31+71b8ded0d6,gee10cc3b42+43dac7135f,gf1cff7945b+816a004954,w.2024.08
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lsst.dax.apdb.apdbSql._ConnectionHackSA2 Class Reference
Inheritance diagram for lsst.dax.apdb.apdbSql._ConnectionHackSA2:

Public Member Functions

 __init__ (self, sqlalchemy.engine.Connection connection)
 
Any connect (self, **Any kwargs)
 
Callable execute (self)
 
Callable execution_options (self)
 
Any connection (self)
 
sqlalchemy.engine.Connection __enter__ (self)
 
None __exit__ (self, Any type_, Any value, Any traceback)
 

Protected Attributes

 _connection
 

Detailed Description

Terrible hack to workaround Pandas 1 incomplete support for
sqlalchemy 2.

We need to pass a Connection instance to pandas method, but in SA 2 the
Connection class lost ``connect`` method which is used by Pandas.

Definition at line 67 of file apdbSql.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.dax.apdb.apdbSql._ConnectionHackSA2.__init__ (   self,
sqlalchemy.engine.Connection  connection 
)

Definition at line 75 of file apdbSql.py.

75 def __init__(self, connection: sqlalchemy.engine.Connection):
76 self._connection = connection
77

Member Function Documentation

◆ __enter__()

sqlalchemy.engine.Connection lsst.dax.apdb.apdbSql._ConnectionHackSA2.__enter__ (   self)

Definition at line 93 of file apdbSql.py.

93 def __enter__(self) -> sqlalchemy.engine.Connection:
94 return self._connection
95

◆ __exit__()

None lsst.dax.apdb.apdbSql._ConnectionHackSA2.__exit__ (   self,
Any  type_,
Any  value,
Any  traceback 
)

Definition at line 96 of file apdbSql.py.

96 def __exit__(self, type_: Any, value: Any, traceback: Any) -> None:
97 # Do not close connection here
98 pass
99
100 @inspection._inspects(_ConnectionHackSA2)

◆ connect()

Any lsst.dax.apdb.apdbSql._ConnectionHackSA2.connect (   self,
**Any  kwargs 
)

Definition at line 78 of file apdbSql.py.

78 def connect(self, **kwargs: Any) -> Any:
79 return self
80

◆ connection()

Any lsst.dax.apdb.apdbSql._ConnectionHackSA2.connection (   self)

Definition at line 90 of file apdbSql.py.

90 def connection(self) -> Any:
91 return self._connection.connection
92

◆ execute()

Callable lsst.dax.apdb.apdbSql._ConnectionHackSA2.execute (   self)

Definition at line 82 of file apdbSql.py.

82 def execute(self) -> Callable:
83 return self._connection.execute
84

◆ execution_options()

Callable lsst.dax.apdb.apdbSql._ConnectionHackSA2.execution_options (   self)

Definition at line 86 of file apdbSql.py.

86 def execution_options(self) -> Callable:
87 return self._connection.execution_options
88

Member Data Documentation

◆ _connection

lsst.dax.apdb.apdbSql._ConnectionHackSA2._connection
protected

Definition at line 76 of file apdbSql.py.


The documentation for this class was generated from the following file: