Skip to content

fix: bigint immediates are appended as string literals instead of numbers.#1445

Merged
igalklebanov merged 1 commit intokysely-org:masterfrom
igalklebanov:fix-bigint-literals
May 24, 2025
Merged

fix: bigint immediates are appended as string literals instead of numbers.#1445
igalklebanov merged 1 commit intokysely-org:masterfrom
igalklebanov:fix-bigint-literals

Conversation

@igalklebanov
Copy link
Copy Markdown
Member

@igalklebanov igalklebanov commented Apr 27, 2025

Hey 👋

closes #1437

bigint immediate values are being appended as string literals instead of numbers.

e.g. 123123n is appended to the query as '123123' instead of 123123.

Noticed when using sql.lit with bigint values in offset. This works in PostgreSQL, but fails in MySQL and MSSQL. There's a workaround (using sql.raw), but that's not intuitive.

Question is, am I missing anything?

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2025 1:02pm

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 27, 2025

kysely_koa_example

npm i https://pkg.pr.new/kysely-org/kysely@1445

commit: 54631e1

@igalklebanov igalklebanov force-pushed the fix-bigint-literals branch from dc96c63 to 54631e1 Compare May 24, 2025 13:02
@igalklebanov igalklebanov added mysql Related to MySQL mssql Related to MS SQL Server (MSSQL) and removed internal labels May 24, 2025
@igalklebanov igalklebanov merged commit a786295 into kysely-org:master May 24, 2025
27 checks passed
@igalklebanov igalklebanov deleted the fix-bigint-literals branch May 24, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mssql Related to MS SQL Server (MSSQL) mysql Related to MySQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bigint immediates are appended to queries as string literals.

1 participant