Skip to content

v0.4.9

Choose a tag to compare

@brunolau brunolau released this 06 Jun 09:24

jsonbConditionUnwrap helper

Added jsonbConditionUnwrap() to convert values to strings for JSONB text comparisons. The PostgreSQL ->> operator always returns text, so non-string values (e.g. numeric enums) must be stringified before comparison.

jsonbArraySome<IntegrationConfig>(p.integrationConfig, c =>
  eq(c.type, jsonbConditionUnwrap(IntegrationType.VILLAPRO))
)

Files Changed

  • src/query/conditions.ts — new jsonbConditionUnwrap() function
  • src/index.ts — exports jsonbConditionUnwrap