(
self, connection, query, dblink, returns_long, mappings, all_objects
)
| 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): |
no test coverage detected