MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / _execute_reflection

Method _execute_reflection

lib/sqlalchemy/dialects/oracle/base.py:2285–2311  ·  view source on GitHub ↗
(
        self, connection, query, dblink, returns_long, params=None
    )

Source from the content-addressed store, hash-verified

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):

Callers 15

has_tableMethod · 0.95
has_sequenceMethod · 0.95
_get_synonymsMethod · 0.95
_get_all_objectsMethod · 0.95
get_schema_namesMethod · 0.95
get_table_namesMethod · 0.95
get_temp_table_namesMethod · 0.95
get_view_namesMethod · 0.95
get_sequence_namesMethod · 0.95
_run_batchesMethod · 0.95

Calls 2

startswithMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected