(array $result)
| 252 | } |
| 253 | |
| 254 | private function extractCacheMetadata(array $result): array { |
| 255 | $cache = ['cacheable' => false, 'key' => null, 'notModified' => false]; |
| 256 | if (!isset($result['cache']) || !is_array($result['cache'])) { |
| 257 | return $cache; |
| 258 | } |
| 259 | |
| 260 | if (isset($result['cache']['cacheable'])) { |
| 261 | $cache['cacheable'] = (bool)$result['cache']['cacheable']; |
| 262 | } |
| 263 | if (isset($result['cache']['key']) && $result['cache']['key'] !== '') { |
| 264 | $cache['key'] = (string)$result['cache']['key']; |
| 265 | } |
| 266 | if (isset($result['cache']['notModified'])) { |
| 267 | $cache['notModified'] = (bool)$result['cache']['notModified']; |
| 268 | } |
| 269 | return $cache; |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Preview the data (one row for column pickers, up to 20 for datasource previews) |
no outgoing calls
no test coverage detected