MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _run_batches

Method _run_batches

lib/sqlalchemy/dialects/oracle/base.py:2864–2883  ·  view source on GitHub ↗
(
        self, connection, query, dblink, returns_long, mappings, all_objects
    )

Source from the content-addressed store, hash-verified

2862 return options.items()
2863
2864 def _run_batches(
2865 self, connection, query, dblink, returns_long, mappings, all_objects
2866 ):
2867 each_batch = 500
2868 batches = list(all_objects)
2869 while batches:
2870 batch = batches[0:each_batch]
2871 batches[0:each_batch] = []
2872
2873 result = self._execute_reflection(
2874 connection,
2875 query,
2876 dblink,
2877 returns_long=returns_long,
2878 params={"all_objects": batch},
2879 )
2880 if mappings:
2881 yield from result.mappings()
2882 else:
2883 yield from result
2884
2885 @lru_cache()
2886 def _column_query(self, owner):

Callers 3

get_multi_columnsMethod · 0.95
_get_indexes_rowsMethod · 0.95

Calls 2

_execute_reflectionMethod · 0.95
mappingsMethod · 0.45

Tested by

no test coverage detected