Skip to content

feat: widen the prepared parameter types (BIGINT, DOUBLE, NUMERIC, temporal, binary) #840

Closed

Description

@yeongseon

Problem

The prepared encoders (_encode_prepared_scalar, used by pycubrid.compat.native bind_param() and by any prepared batch path) accept only a 32-bit INT, a string and NULL, plus INT/STRING collections and LOB handles. In the #836 probes they rejected bool, an int beyond 32 bits, float, Decimal, date, datetime and bytes. The literal executemany() path renders all of these. Without the wider set, an opt-in EXECUTE_ARRAY path (#839) can serve only INT/string workloads.

Scope

Add typed prepared encodings with offline tests, plus integration round trips on CUBRID 10.2-11.4:

  • BIGINT for 64-bit ints;
  • DOUBLE for float, rejecting nan and inf as the literal path does;
  • NUMERIC as text for Decimal;
  • DATE, TIME and DATETIME (and DATETIMETZ if the server accepts it) for the temporal types;
  • VARBIT for bytes;
  • a documented choice for bool.

Document each mapping next to the literal mapping in PARAMETER_BINDING.md. Note where host-variable coercion differs from literal coercion.

Non-goals

  • Changing the literal binding contract of ordinary cursors.

Links

Activity

  1. yeongseon commented on Oct 11, 2026

    @yeongseon
    ContributorAuthor

    Deferred until after the current stabilization release (2026-10-12). #815 admits only fixes for demonstrated regressions in the supported contract, plus the release-candidate work (#833). It does not admit "additional APIs … or opportunistic feature additions". This issue is a new opt-in feature or optional optimization, not a regression fix, so it waits for the next cycle. The evidence from #836 and #822 is already recorded (cubrid-benchmark#22, cubrid-benchmark#23, and the executemany() sections of docs/PERFORMANCE.md from #838 and #843). Nothing is lost by waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions