Skip to content

fix: rebuilds options from realm-web flat fields; covers find/findOne…#84

Closed
nikuniku74 wants to merge 1 commit into
mainfrom
fix/issue-82
Closed

fix: rebuilds options from realm-web flat fields; covers find/findOne…#84
nikuniku74 wants to merge 1 commit into
mainfrom
fix/issue-82

Conversation

@nikuniku74

Copy link
Copy Markdown
Collaborator

Cosa c'era da fare:

L'SDK realm-web manda le opzioni di query appiattite al primo livello dell'argomento del service call (sort, limit, skip, upsert, returnNewDocument, e projection rinominato project per find/findOne). Ma il controller destrutturava solo un options annidato — che da realm-web non arriva mai. Risultato: tutte queste opzioni venivano silenziosamente scartate.

Cosa è stato fatto:
Fix puntuale, un solo punto: ricostruisco options dai campi appiattiti in controller.ts, prima di passarli a executeQuery (che già sapeva gestire options). Nessun cambio strutturale.

  • mergeRealmOptions(rawArgs, options): raccoglie i campi top-level, mappa project→projection, e fa vincere l'options annidato se presente (retro-compatibile col client nativo flowerbase, che continua a passare i test).
  • Aggiunto un test in controller.test.ts che verifica che sort/limit/project appiattiti finiscano in options.
  • tsc pulito, 217/217 test verdi.

@nikuniku74 nikuniku74 closed this Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant