You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fetch('doc1', ['name']) (scalar PK followed by an outputFields array) fails with PKs must be non-empty strings — technically correct but gives no hint about the actual calling convention.
Evidence
src/ZVec.php:766-776 — in the scalar form, all of $args are treated as PKs, so the array element fails the string check.
The two supported forms are fetch('pk1', 'pk2') and fetch(['pk1','pk2'], ?array $outputFields) — mixing scalar PK + array outputFields is not supported.
Detect an array in the scalar-form arguments and throw (or better: accept) with a message pointing to the calling convention, e.g.:
"Mixing scalar PKs with an outputFields array is not supported — use fetch(['pk1'], ['name']) instead" (or support the form outright).
Finding (from #192 follow-up)
fetch('doc1', ['name'])(scalar PK followed by an outputFields array) fails withPKs must be non-empty strings— technically correct but gives no hint about the actual calling convention.Evidence
src/ZVec.php:766-776— in the scalar form, all of$argsare treated as PKs, so the array element fails the string check.fetch('pk1', 'pk2')andfetch(['pk1','pk2'], ?array $outputFields)— mixing scalar PK + array outputFields is not supported.Suggested improvement
Detect an array in the scalar-form arguments and throw (or better: accept) with a message pointing to the calling convention, e.g.:
"Mixing scalar PKs with an outputFields array is not supported — use fetch(['pk1'], ['name']) instead" (or support the form outright).
Low priority / DX polish.