Skip to content

document isSafeImmediate and parseSafeImmediateValue behavior in eb.case(). #1593

@igalklebanov

Description

@igalklebanov

Hey 👋

Value-first methods, in most cases, append to parameters - unless you use eb.lit or sql.lit.

For some undocumented reason, eb.case()'s then and else values are injected into the query string for numbers, booleans and nulls - possibly because eb.lit('string') is not allowed.

This is surprise behavior!

Investigate why that was chosen as a strategy.
Remove isSafeImmediateValue and parseSafeImmediateValue if there's no good reason.

We need to document this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions