(extversion)
| 38 | // Parse a pgvector extversion string ('0.8.0', '0.7.4') to { major, minor }. |
| 39 | // Returns null on anything unparseable so callers fall back to conservative defaults. |
| 40 | export function parseVectorVersion(extversion) { |
| 41 | if (typeof extversion !== 'string') return null; |
| 42 | const m = extversion.trim().match(/^(\d+)\.(\d+)/); |
| 43 | if (!m) return null; |
| 44 | return { major: Number(m[1]), minor: Number(m[2]) }; |
| 45 | } |
| 46 | |
| 47 | // iterative_scan (relaxed_order) landed in pgvector 0.8.0. |
| 48 | export function supportsIterativeScan(version) { |
no outgoing calls
no test coverage detected