Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated implementation examples in manual's MULTISET section #12938

Closed
lukaseder opened this issue Jan 25, 2022 · 0 comments
Closed

Outdated implementation examples in manual's MULTISET section #12938

lukaseder opened this issue Jan 25, 2022 · 0 comments

Comments

@lukaseder
Copy link
Member

The manual section about MULTISET shows outdated implementation examples:
https://www.jooq.org/doc/latest/manual/sql-building/column-expressions/multiset-value-constructor/

Specifically, it shows how we used to map records to JSON_OBJECT(), when in fact we're now using JSON_ARRAY(), because:

  • The element order is clearly defined in an array, not in an object
  • Objects can't have duplicate keys, so we'd have to map keys to stringified ordinals anyway (which is what we're doing in XML)
  • JSON arrays use less space than JSON objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant