Skip to content

feat(sql): bind typed parameters across database clients - #4

Merged
slepp merged 1 commit into
mainfrom
slepp/feat-typed-sql-params
Sep 19, 2026
Merged

slepp merged 1 commit into
mainfrom
slepp/feat-typed-sql-params

Conversation

@slepp

@slepp slepp commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Why

SQL parameters were newline-delimited bytes. A multiline value became several parameters, and applications could not bind NULL, booleans or binary data reliably.

What

Add hew.db.sql.Param with Null, Bool, Int, Float, Text and Bytes variants. SQLite, MySQL and PostgreSQL accept Vec<Param>, use Hew's wire codec internally and bind native typed values. PostgreSQL prepares typed parameters instead of coercing every input to text. Empty values remain distinct from NULL.

Test

  • Execute the three Hew integration suites against SQLite, MySQL and PostgreSQL, including multiline Unicode text, arbitrary bytes, NULL, booleans, integer limits, floats, empty values and parameter-count errors.
  • Run native crate tests, all ecosystem source checks, the package contract and make lint.
  • Exercise a multiline blog post through HTTP and confirm exact SQLite persistence; import CSV values containing newlines, Unicode and quoted identifiers into PostgreSQL.

@slepp
slepp merged commit d07adaf into main Sep 19, 2026
2 checks passed
@slepp
slepp deleted the slepp/feat-typed-sql-params branch September 30, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant