(
self, connection, query, dblink, returns_long, params=None
)
| 2283 | return "READ COMMITTED" |
| 2284 | |
| 2285 | def _execute_reflection( |
| 2286 | self, connection, query, dblink, returns_long, params=None |
| 2287 | ): |
| 2288 | if dblink and not dblink.startswith("@"): |
| 2289 | dblink = f"@{dblink}" |
| 2290 | execution_options = { |
| 2291 | # handle db links |
| 2292 | "_oracle_dblink": dblink or "", |
| 2293 | # override any schema translate map |
| 2294 | "schema_translate_map": None, |
| 2295 | } |
| 2296 | |
| 2297 | if dblink and returns_long: |
| 2298 | # Oracle seems to error with |
| 2299 | # "ORA-00997: illegal use of LONG datatype" when returning |
| 2300 | # LONG columns via a dblink in a query with bind params |
| 2301 | # This type seems to be very hard to cast into something else |
| 2302 | # so it seems easier to just use bind param in this case |
| 2303 | def visit_bindparam(bindparam): |
| 2304 | bindparam.literal_execute = True |
| 2305 | |
| 2306 | query = visitors.cloned_traverse( |
| 2307 | query, {}, {"bindparam": visit_bindparam} |
| 2308 | ) |
| 2309 | return connection.execute( |
| 2310 | query, params, execution_options=execution_options |
| 2311 | ) |
| 2312 | |
| 2313 | @util.memoized_property |
| 2314 | def _has_table_query(self): |
no test coverage detected