Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unreleased

- SQLite query results preserve the full 64-bit range of `INTEGER` values. ([#1636](https://github.com/sqlpage/SQLPage/issues/1636))
- Big number title links have a larger target for touch and pointer users.
- Carousel slide indicators and pagination arrows now have accessible names. Keyboard users can activate carousel arrows and enabled pagination links. Screen readers announce the current page.
- Button, card, carousel, and login images accept alternative text. Embedded card frames use their own title or the card title.
Expand Down
7 changes: 4 additions & 3 deletions src/webserver/database/sql_to_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ pub(super) fn sql_nonnull_to_json<'r>(
match type_name {
"REAL" | "FLOAT" | "FLOAT4" | "FLOAT8" | "DOUBLE" => decode_raw::<f64>(raw_value).into(),
"NUMERIC" | "DECIMAL" => decimal_to_json(&decode_raw(raw_value)),
"INT8" | "BIGINT" | "SERIAL8" | "BIGSERIAL" | "IDENTITY" | "INT64" | "INTEGER8"
| "BIGINT SIGNED" => decode_raw::<i64>(raw_value).into(),
"INT" | "INT4" | "INTEGER" | "MEDIUMINT" | "YEAR" => decode_raw::<i32>(raw_value).into(),
// SQLite INTEGER and unsigned ODBC SQL_INTEGER can exceed the i32 range.
"INTEGER" | "INT8" | "BIGINT" | "SERIAL8" | "BIGSERIAL" | "IDENTITY" | "INT64"
| "INTEGER8" | "BIGINT SIGNED" => decode_raw::<i64>(raw_value).into(),
"INT" | "INT4" | "MEDIUMINT" | "YEAR" => decode_raw::<i32>(raw_value).into(),
"INT2" | "SMALLINT" | "TINYINT" => decode_raw::<i16>(raw_value).into(),
"BIGINT UNSIGNED" => decode_raw::<u64>(raw_value).into(),
"INT UNSIGNED" | "MEDIUMINT UNSIGNED" | "SMALLINT UNSIGNED" | "TINYINT UNSIGNED" => {
Expand Down
3 changes: 3 additions & 0 deletions tests/sql_test_files/data/large_integer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- SQLPage evaluates literal-only SELECTs itself, so + 0 forces database execution.
-- Keep the expected value as text so it cannot overflow in the integer decoder.
select '3000000000' as expected_contains, 3000000000 + 0 as actual;
Loading