RSQLite 3.54.1 adds opt-in UTF-8 checks when R reads SQLite text
The November 28 CRAN release bundles SQLite 3.54.1, counts rows in 64 bits and changes how row-name defaults are configured.
A new CRAN release with three visible changes
RSQLite 3.54.1 reached CRAN on November 28. The package connects R applications to SQLite databases. Its release notes list an update to the bundled SQLite engine, a connection option that validates UTF-8 in text read into R character columns, and 64-bit row counters. The independently maintained CRANberries archive records the release and a source comparison with version 3.53.3. The two versioned products are easy to confuse. SQLite is the database engine. RSQLite is the R package that bundles and exposes it. The dated record here concerns the distribution of the R package.
Validate text at the point where R reads it
The release adds check_utf8 to the connection. When enabled, the option checks the validity of text read into character columns. It can be useful when a program opens files assembled by older import processes or from different incoming formats. To investigate behavior, use one fixture with legitimate non-ASCII text and another with controlled invalid bytes. Read both through the same query with the option disabled and enabled. Attach the package version and connection settings to the results. That makes it possible to determine whether an observed error comes from this validation step or from a later stage that writes a report.
A larger counter can still reach a narrow caller
According to the release notes, dbGetRowCount and dbGetRowsAffected can now report very large counts because the package counts internally in 64 bits. They describe different things. One counts rows fetched as query results, while the other counts rows affected by a statement that changes data. A downstream script may still truncate or coerce the number even though the database package exposes the count as numeric. A migration check can follow the count through logging, comparison and any separate storage format. The point is to test the same end-to-end reporting path that handles larger batches.
Pass the row-name choice explicitly
Defaults configured through pkgconfig are being deprecated. The release notes say row.names defaults to FALSE. An earlier pkgconfig option is temporarily honoured with a warning when that package is already loaded. If a report joins data using row names, test it in a fresh R session as well as one loading the old shared settings. Passing row.names explicitly makes the setting visible in code review. A separate column for a business identifier also makes it easier to inspect whether values survive a change in how R represents a table.
Plan checks for the connection modes in use
Other entries concern building from source with Rtools 4.2 and opening SQLite files over an HTTP virtual file system. The release suppresses repeated response header output and loads default extensions on those connections. A local in-memory query may pass while a separate remote-file check exposes a difference to an application. Record the RSQLite release, the bundled engine, the operating system and how the database was opened. A small fixture covering each connection mode in real use is enough to tell whether the update changes the application’s expected behavior.
Archive photo · Contributers2020 / Wikimedia Commons ↗ · CC BY-SA 4.0 · Illustrative archive photo of local storage. Resized for WebP.
Sources and verification
- Primary sourceCRAN RSQLite ↗
- Technical documentRSQLite sürüm notları ↗
- Reporting / cross-checkCRANberries ↗
- BackgroundSQLite ↗
Reader discussion
What would you change first for maintainability and testing in your own project?
No comments yet. Be the first to contribute.
Write a comment