Skip to content

Sql4json

v1.1.0 Feature

This release adds 2 notable features for engineering teams evaluating rollout.

Published 3mo Search Engines
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

antlr4 data-processing java java-library json json-processing
+6 more
json-query json-query-engine maven query-engine sql sql-parser

Summary

AI summary

Updates Added — Parameter Binding, Added — Object Mapping, and Class across a mixed release.

Full changelog

Added — Object Mapping

  • SQL4Json.queryAs and queryAsList — map query results directly to Java records, POJOs, or basic types (both single-source and JOIN variants).
  • PreparedQuery.executeAs and executeAsList (String and JsonValue overloads).
  • SQL4JsonEngine.queryAs and queryAsList.
  • JsonValue.as(Class) and JsonValue.as(Class, Sql4jsonSettings) default methods on the sealed interface.
  • MappingSettings subsection of Sql4jsonSettings with MissingFieldPolicy enum (IGNORE / FAIL).
  • SQL4JsonMappingException (new sealed subclass of SQL4JsonException).

Added — Parameter Binding

  • PreparedQuery.execute(String json, BoundParameters params) and execute(JsonValue, BoundParameters).
  • PreparedQuery.execute(String json, Object... positionalParams) shortcut.
  • PreparedQuery.execute(String json, Map<String, ?> namedParams) shortcut.
  • PreparedQuery.executeAs / executeAsList with BoundParameters overloads.
  • SQL4JsonEngine.query / queryAsJsonValue / queryAs / queryAsList with BoundParameters overloads.
  • BoundParameters immutable carrier (named & positional modes, named() / positional() / of(Object...) / of(Map) factories, bind / bindAll, EMPTY singleton).
  • Grammar support for ? (positional) and :name (named) placeholders throughout WHERE / SELECT / GROUP BY / HAVING / JOIN / function arguments.
  • Dynamic LIMIT / OFFSET binding (placeholders accepted in both positions).
  • IN-list expansion: IN (?) + collection bound → expanded to N literals; empty collection → zero-row predicate.
  • LimitsSettings.maxParameters (default 1024) — DoS guard against placeholder flooding.
  • SQL4JsonBindException (new sealed subclass of SQL4JsonException) — surfaced at substitute time for missing / extra / type-mismatch bindings, IN-list overflow, and LIMIT/OFFSET validation failures.

Changed

  • Sql4jsonSettings gains a mapping component (all existing construction paths preserved via builder).
  • Grammar now recognizes ? and :name as placeholders in value positions.
  • LimitsSettings canonical-constructor signature extended (maxParameters) — public callers using .builder() unaffected.
  • SQL4JsonEngine bypasses QueryResultCache for parameterized queries.
  • Internal: ISO date/datetime/instant parsing consolidated into json.IsoTemporals; registry.DateCoercion delegates.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track Sql4json

Get notified when new releases ship.

Sign up free

About Sql4json

All releases →

Beta — feedback welcome: [email protected]