(self)
| 2496 | _class_methods = {"connection", "execute", "get_bind", "scalar", "scalars"} |
| 2497 | |
| 2498 | def _public_session_methods(self): |
| 2499 | Session = sa.orm.session.Session |
| 2500 | |
| 2501 | blocklist = { |
| 2502 | "begin", |
| 2503 | "query", |
| 2504 | "bind_mapper", |
| 2505 | "get", |
| 2506 | "get_one", |
| 2507 | "bind_table", |
| 2508 | } |
| 2509 | specials = {"__iter__", "__contains__"} |
| 2510 | ok = set() |
| 2511 | for name in dir(Session): |
| 2512 | if ( |
| 2513 | name in Session.__dict__ |
| 2514 | and (not name.startswith("_") or name in specials) |
| 2515 | and ( |
| 2516 | _py_inspect.ismethod(getattr(Session, name)) |
| 2517 | or _py_inspect.isfunction(getattr(Session, name)) |
| 2518 | ) |
| 2519 | ): |
| 2520 | if name in blocklist: |
| 2521 | continue |
| 2522 | spec = inspect_getfullargspec(getattr(Session, name)) |
| 2523 | if len(spec.args) > 1 or spec.varargs or spec.kwonlyargs: |
| 2524 | ok.add(name) |
| 2525 | return ok |
| 2526 | |
| 2527 | def _map_it(self, cls): |
| 2528 | self.mapper_registry.dispose() |
no test coverage detected