Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sqlite3 1.7.3 → 2.3.1 (major) #1393

Closed
wants to merge 1 commit into from
Closed

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Nov 26, 2024

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ sqlite3 (1.7.3 → 2.3.1) · Repo · Changelog

Release Notes

2.3.1

2.3.1 / 2024-11-25

Dependencies

sha256 checksums

a8398a65bf84467fb03e29914f31282878d0f94fd78bc511b5d7d4b3e447effc  sqlite3-2.3.1-aarch64-linux-gnu.gem
9684f77bd2c0e18ee6c5ab15b35a7f953d025c26bc8915832a33306d2926b986  sqlite3-2.3.1-aarch64-linux-musl.gem
882a006725ce6905570c652c8b2f2d1d295b9f21ac009f176c91777d7c602a40  sqlite3-2.3.1-arm64-darwin.gem
d9ded328f99b8d0c774aa1a11126806f1c3c5160e5d8a00f42900b0bb6693f55  sqlite3-2.3.1-arm-linux-gnu.gem
648802caf7556adbae12a6c1908feb2cd64bef2bc9e04acdb40c0a44e00b3d16  sqlite3-2.3.1-arm-linux-musl.gem
46ed5f9086bc59ea33a90ea08db93fa887809d37bc2f8f96693d32540b295b9d  sqlite3-2.3.1.gem
e47c52052e8063ad4f3686e7f59cfc431a08bb7320a6e09823a49decff60fd4e  sqlite3-2.3.1-x64-mingw-ucrt.gem
700558d100306c17e0f14ae2b493e4c83e5c77a713015eba79e0ca2dd3aa0f17  sqlite3-2.3.1-x86_64-darwin.gem
7e71f818d510998a8b2d1cf9ef5a53ef85300736648621c66cb9494b1684b339  sqlite3-2.3.1-x86_64-linux-gnu.gem
709406604aeee3622bc01c970f31bbcfadb0590f4ee3dc5bb6fe4fbf1c855a7e  sqlite3-2.3.1-x86_64-linux-musl.gem
dfa199e6fa67608b547eee6b332c60f0719fffa14275319f4c82282af6d4f036  sqlite3-2.3.1-x86-linux-gnu.gem
3bda981d1d3049d1285958e55bcbf0600863216f079fb019f04e7364a3733757  sqlite3-2.3.1-x86-linux-musl.gem

2.3.0

2.3.0 / 2024-11-20

Added

  • The SQLITE_DBPAGE extension is now enabled by default, which implements an eponymous-only virtual table that provides direct access to the underlying database file by interacting with the pager. See https://www.sqlite.org/dbpage.html for more information. [#578] @flavorjones
  • The DBSTAT extension is now enabled by default, which implements a read-only eponymous virtual table that returns information about the amount of disk space used to store the content of an SQLite database. See https://sqlite.org/dbstat.html for more information. [#580] @pawurb @flavorjones
  • Database#optimize which wraps the pragma optimize; statement. Also added Constants::Optimize to allow advanced users to pass a bitmask of options. See https://www.sqlite.org/pragma.html#pragma_optimize. [#572] @alexcwatt @flavorjones
  • SQLite3::VERSION_INFO contains a bag of metadata about the gem and the sqlite library used. SQLite3::SQLITE_PACKAGED_LIBRARIES and SQLite3::SQLITE_PRECOMPILED_LIBRARIES indicate how the gem was built. [#581] @flavorjones

Fixed

  • Database#encoding= support for switching the database encoding to UTF-16BE, which has been broken since Database#encoding= was introduced in v1.3.12 in 2016. [#575] @miyucy
  • Omit mention of the pkg-config gem when failing to build from source, since it is not used. [#358] @flavorjones

sha256 checksums

87cbf39ca2ca07c4e6f3d7a5168bfc2fcca845ea36e6d04408622226900e7f92  sqlite3-2.3.0-aarch64-linux-gnu.gem
0e67ea7d8dc42178ac7b57f499177288cc1edf9c7932e86cf631e932947228c2  sqlite3-2.3.0-aarch64-linux-musl.gem
c2beb302a07e106722cd63bae42425bd0e913a4e90b552df64b1f04dec3d676d  sqlite3-2.3.0-arm64-darwin.gem
78ef24e763e513635e51a26709ad23cc11c30a895b5e2bc8c7ae2407a4f56059  sqlite3-2.3.0-arm-linux-gnu.gem
3815a8adc37f6d65e460c97eba725334b4db3a8bc68dbd2b2cfd2079656b20be  sqlite3-2.3.0-arm-linux-musl.gem
dc1b2afd5d099931d5fca7dfec44af3b78b9ec383c382edc6d35e268064b3673  sqlite3-2.3.0.gem
fb32821ae861135e670828f084de9d9e69b4598cd1643f7f8e6c7deeea06b000  sqlite3-2.3.0-x64-mingw-ucrt.gem
6ab00fbf07537e14cebd66e97159053e9094e68da9c6db8f82c21b4333a17345  sqlite3-2.3.0-x86_64-darwin.gem
5b8bbd85e661e04da863cb3d092fbf4e37c9817828ecc6f40a81791bd2111612  sqlite3-2.3.0-x86_64-linux-gnu.gem
db5fef66552d7e10c750f737f8838a63c39055711afac8e16025dbe274217b2b  sqlite3-2.3.0-x86_64-linux-musl.gem
bdb241da2bebe2bc5449cf121a552fe89f2476ed21cff169aa4d0f5ad9d750ff  sqlite3-2.3.0-x86-linux-gnu.gem
9c0989eb572331f569b4b976d6bf4010e322b4f591eb03fbcbf42674cacb4310  sqlite3-2.3.0-x86-linux-musl.gem

2.2.0

2.2.0 / 2024-10-30

Added

Improved

  • SQL Syntax errors during Database#prepare will raise a verbose exception with a multiline message indicating with a "^" exactly where in the statement the error occurred. [#554] @fractaledmind @flavorjones

sha256 checksums:

5e33dc761b8be16b0ba2480fd4dfa85ad3f4d0b7514c1d4375700c7bb0e0a101  sqlite3-2.2.0-aarch64-linux-gnu.gem
99b31de2c6a68754f03c7fb31af1a432567b6aef6d10163e56552eb278de1066  sqlite3-2.2.0-aarch64-linux-musl.gem
c86bfa909d052fe31d94f6b589dcc8eee23cb60988754177db0014729090bd50  sqlite3-2.2.0-arm64-darwin.gem
bccdd28086df162e5bff6b6b205a4c1ae5291a8d21d3655e86a94f0f8da399be  sqlite3-2.2.0-arm-linux-gnu.gem
6e44744b8526a180fee6b68245601e1646d82916fb67c6c4479cdf42e78b82dd  sqlite3-2.2.0-arm-linux-musl.gem
85ebbd8fceb47fcf96795260398c7e96dedcfc2919ec064568d59ce43ace1aa7  sqlite3-2.2.0.gem
76377037bff70fa786dda9694d09937fc750314ed01ab5016eed2f9147784a8b  sqlite3-2.2.0-x64-mingw-ucrt.gem
525a96b032e0881b11a5498a0531fd2487bc6049e1b58f8fa378dd3a59560e67  sqlite3-2.2.0-x86_64-darwin.gem
3d05032a786fc56299acd743ee226715cca49a4acd2159ab8e1ebae53f24fb2d  sqlite3-2.2.0-x86_64-linux-gnu.gem
59e9dcf90595c15bfe00f816d5dec4123c1d01530ccba069c4e6989df6d8455e  sqlite3-2.2.0-x86_64-linux-musl.gem
cc896e77e85119cbf2126167e6990ba6356da7ca5f53e09372470ffbf2789834  sqlite3-2.2.0-x86-linux-gnu.gem
ef75eece5db2403faddf62ded791a7d6deef94c44a322b8ea1ec0a154f0d2d9e  sqlite3-2.2.0-x86-linux-musl.gem

2.1.1

2.1.1 / 2024-10-22

Dependencies

sha256 checksums:
8e66a55e17ab5251d8a3e86c95fa79676d7b6f9657f5a2bade6604d69e15fc6f  sqlite3-2.1.1-aarch64-linux-gnu.gem
74bb21dade2c31eb9de8bcb410ed0a5b5e2d3bfe8643ad129b38d8452e2e46ce  sqlite3-2.1.1-aarch64-linux-musl.gem
964d03e90952b355827a6c981511304c36d6cb552a894112720655793d09b78c  sqlite3-2.1.1-arm64-darwin.gem
c42e2888360ba68bcb11e56b6df253ccdd650208f9ee25acbe0df1d3b8776113  sqlite3-2.1.1-arm-linux-gnu.gem
2e3adc9f0d42287376ee3dbf2176fd01a100c6588271ad8418ea70758a161a06  sqlite3-2.1.1-arm-linux-musl.gem
08ef9a277f25665bf237f16f7c68ec22b79100d1abe256e566a5e23337a62cf6  sqlite3-2.1.1.gem
8b027802f064007e0dc87f26eda4479aaf3e7ae1e8708c9b851522ea7c1dfa64  sqlite3-2.1.1-x64-mingw-ucrt.gem
b38eac8abe54341d4cc8ffa4285f78755e07852f82559b2815e7b85e353d398c  sqlite3-2.1.1-x86_64-darwin.gem
f2cd96fe785f6928d1696751b54dac854dda880db67cd54525838d5849a5c1b9  sqlite3-2.1.1-x86_64-linux-gnu.gem
e7f43e4f0fbe575ebaf437489bd12c90464c8d287af14d3879359e4ac1e6a820  sqlite3-2.1.1-x86_64-linux-musl.gem
b2e0d4479c505af22e93172abc0e34979c5d8ba55d7139be3bc725cea2b34e75  sqlite3-2.1.1-x86-linux-gnu.gem
d4babefc2e142cc230f20aae94cc87348006ebaf5f514ba5fcb45fdc73461e42  sqlite3-2.1.1-x86-linux-musl.gem

2.1.0

2.1.0 / 2024-09-24

Ruby

Fork safety improvements

Sqlite itself is not fork-safe. Specifically, writing in a child process to a database connection that was created in the parent process may corrupt the database file. To mitigate this risk, sqlite3-ruby has implemented the following changes:

  • All open writable database connections carried across a fork() will immediately be closed in the child process to mitigate the risk of corrupting the database file.
  • These connections will be incompletely closed ("discarded") which will result in a one-time memory leak in the child process.

If it's at all possible, we strongly recommend that you close writable database connections in the parent before forking. If absolutely necessary (and you know what you're doing), you may suppress the fork safety warnings by calling SQLite3::ForkSafety.suppress_warnings!.

See the README's "Fork Safety" section and adr/2024-09-fork-safety.md for more information. [#558, #565, #566] @flavorjones

Improved

  • Use sqlite3_close_v2 to close databases in a deferred manner if there are unclosed prepared statements. Previously closing a database while statements were open resulted in a BusyException. See https://www.sqlite.org/c3ref/close.html for more context. [#557] @flavorjones
  • When setting a Database busy_handler, fire the write barrier to prevent potential crashes during the GC mark phase. [#556] @jhawthorn

Documentation

  • The FAQ.md has been updated to fix some inaccuracies. [#562] @rickhull

New Contributors

Full Changelog: v2.0.4...v2.1.0


sha256 checksums:

6ed8c7edce2c4ec432152f548ffc80667bd774870d585bf5634d8e2e085fb70d  sqlite3-2.1.0-aarch64-linux-gnu.gem
b8330e67696ae9294b6e5da0d7ceb4e33e46462e1911b79fdf81eb20aa6f0dc7  sqlite3-2.1.0-aarch64-linux-musl.gem
577636e21e7373546f2f2e526316a53ed0ee0eeaa10960647e26479d1ebb49b9  sqlite3-2.1.0-arm64-darwin.gem
7bad1c60fd4e46c4c941bfc4d12c59254a9715b289655a606880e471e829c74c  sqlite3-2.1.0-arm-linux-gnu.gem
42ec543f593e0b3ddb5a944e15ede59dea3cc35acb27639e67bc6f819b1b5bcc  sqlite3-2.1.0-arm-linux-musl.gem
aea47c58078c274ca83195ce1686ee22c4641eb60ccab12918500e78c4babb4f  sqlite3-2.1.0.gem
0c7505899d8754c4cd73b02f0aec88028a0f282cdb426f3b2e5fa2c9dafd0dce  sqlite3-2.1.0-x64-mingw-ucrt.gem
e2be8fad85b6aee16f83baad378b3b3ab992c904e98592cccfd845ad56f4da1f  sqlite3-2.1.0-x86_64-darwin.gem
8993191e8304386d6a9bd76fe9ed161f323ddf857cc06f7f77a31e8b6ccb4d34  sqlite3-2.1.0-x86_64-linux-gnu.gem
cd6b7e6701b1110f033d3dbd156ac19bca011ed4e976c7897b402d578720b9c3  sqlite3-2.1.0-x86_64-linux-musl.gem
1a092fbe4b6cbf20bbeec239c95b8b9caa0d9faa0ad2431fa46ababcd3d91718  sqlite3-2.1.0-x86-linux-gnu.gem
ea377977a07031a6215a2d5ed1e0bd7fb77da0cbbca1af145533b10e0e11bc02  sqlite3-2.1.0-x86-linux-musl.gem

2.0.4

2.0.4 / 2024-08-13

Dependencies


sha256 checksums:

60437450d483a1b9716e699c3a6ad91eb623808ea501bfa0330512c983c97291  sqlite3-2.0.4-aarch64-linux-gnu.gem
8bab69599cbab225eac97ba9ce6948bc4fd5dd891d90f64e128881f5ef999891  sqlite3-2.0.4-aarch64-linux-musl.gem
eea5985bad8d47712bfd0838b162409fe4e30efca8c1deb1de736a1af7a496d0  sqlite3-2.0.4-arm-linux-gnu.gem
3118f35b7ab5dc065e003f76657874cb031a4cff3bd0d67bfc095e4ae7bc92fb  sqlite3-2.0.4-arm-linux-musl.gem
e2be5cb97b389a92dd02fd87c5553e8e85102a28768da7008ca1e41d85396c13  sqlite3-2.0.4-arm64-darwin.gem
63bc85893b6cff327fec7904cca5ac05be9d7c2bde30e41b196a28eca7beb4f4  sqlite3-2.0.4-x64-mingw-ucrt.gem
e2abc8029a97e0b418b2c130b4a81b370951c5bdf69e910abe7e3808e18bac6a  sqlite3-2.0.4-x64-mingw32.gem
cf43867d510793c3cb6115a4706c2fa5c1073f456ef655e64dfd2ccb37c3bb3e  sqlite3-2.0.4-x86-linux-gnu.gem
97501d4cdc9d15b44cc690fd2e4154b0f6fee7c4c4f5905f05987a533d8b7512  sqlite3-2.0.4-x86-linux-musl.gem
0c1560504084a110f7a1b1739eb1335a666f20b9936779a0bd3f6ff98d40ae58  sqlite3-2.0.4-x86_64-darwin.gem
0804631fc8ec95727670aefc83db0544dd5a919dc46a08c86357ac6c66e0da88  sqlite3-2.0.4-x86_64-linux-gnu.gem
20909e1855b9f7cf202d90f000ab99ace13f00e7ed70cdb524043c778bf6382a  sqlite3-2.0.4-x86_64-linux-musl.gem
aace56b02b3932efa2e25d3dec6f7fb67b65f9df8266aad3ba4fdc4fe520918a  sqlite3-2.0.4.gem

2.0.3

2.0.3 / 2024-07-29

Improved

  • Database#quote avoids allocating strings where reusing frozen strings is preferable. #548 @casperisfine

sha256 checksums:

0fc2755c34ae241dcb79563af862d642324e6efcfcd64b2fe271254c7c902ad7  sqlite3-2.0.3-aarch64-linux-gnu.gem
e0c2b322e747ef16eb18168c53682ac374aab3fd92e745f0b6023418b5e914ce  sqlite3-2.0.3-aarch64-linux-musl.gem
f1345ad1ccddf1c758921af527816c0b0dd7edc736020ecc9fb4bb4ccf6aaba3  sqlite3-2.0.3-arm-linux-gnu.gem
c94b7955e2615d71f81076cb5498eb8637e838c1a450f740aad0e2b4fdfbab17  sqlite3-2.0.3-arm-linux-musl.gem
ac5e7bd0f84ff8287d5a71a66b4e2e79785901e589a5a853f04be950fba6b18f  sqlite3-2.0.3-arm64-darwin.gem
032075d9e4baac4f8240a363d09a72e4441bc87d71c964febb2de8345dbc111f  sqlite3-2.0.3-x64-mingw-ucrt.gem
a07b8244d1c446f73cfa294da5577f6700892ccbcebf0d2286f5fde27faa46e6  sqlite3-2.0.3-x64-mingw32.gem
91a02ef005512cdbe91a709146be2f0a6843fac8dc28f32eba5b95af23406d8a  sqlite3-2.0.3-x86-linux-gnu.gem
d15330440c4a4136a42bd03821996cf629b0d2921c5fd314b9e35ecdb6c96ba5  sqlite3-2.0.3-x86-linux-musl.gem
256e681716bda9f3d26dd438db12fc8f588f8dca4a5f7333e2aee86b2932d124  sqlite3-2.0.3-x86_64-darwin.gem
8adb0417c96e49ba70b0e9fe3fd1052d3e18dbc71098c78ea66acd10c17522ea  sqlite3-2.0.3-x86_64-linux-gnu.gem
5e3049d1c8d252cbe7d344b8ee9c63ca77c7c206a1c98d2344854533e6f1c4b7  sqlite3-2.0.3-x86_64-linux-musl.gem
182dbeddea1fc27cdee94f19f1c0ad42565bf65c24193f488eb2c33184b722d0  sqlite3-2.0.3.gem

2.0.2

2.0.2 / 2024-05-23

Dependencies


sha256 checksums:

64296bb750efa19c4249136c2289799a4ac044116b7cc095784dc56358964dc1  sqlite3-2.0.2-aarch64-linux-gnu.gem
cc62889120bb62c98b513fc2b5fc91da944ed7e139efcc4a85fe1d03258462e3  sqlite3-2.0.2-aarch64-linux-musl.gem
29f74fb1af530ea4d1826efa8cb369ea11e476fd885843bceb191ef000c62695  sqlite3-2.0.2-arm-linux-gnu.gem
bbacba2099fe6084b073d4d4e23e54823345a8d2e98800380036fe7ae3323092  sqlite3-2.0.2-arm-linux-musl.gem
184e28292d46feea9132cd936bfe01d47a08a6d7839bc4c5eb3f09b9bed2e770  sqlite3-2.0.2-arm64-darwin.gem
c8144a1f4e2eea742fb4a4fdc9d0ba674c4e787ebb582671b8b69739f9fed191  sqlite3-2.0.2-x64-mingw-ucrt.gem
1c39e02dbb8099215e74a816d6d375136cc9851cf6833248b9cd888e022d627e  sqlite3-2.0.2-x64-mingw32.gem
1b92d4b4e54ba0245bc5d16415891e697766d62eb188fc173356e03f03881d78  sqlite3-2.0.2-x86-linux-gnu.gem
b256dbdb7117d60a0171df875fc2e07d001f03699bf12a196bf6f415b068643d  sqlite3-2.0.2-x86-linux-musl.gem
390c6284f89774cb228fb180b75ac54e5009b0aa24c72f18ad07465635029ea8  sqlite3-2.0.2-x86_64-darwin.gem
15dbf6f47755acb063c5b71a2dd6c65ba582eab3e0d9d4e95cde737120333efb  sqlite3-2.0.2-x86_64-linux-gnu.gem
5b7867dee7401c80db616828c31e5e20963c1dd7d4682757c9cc5aaba627b36c  sqlite3-2.0.2-x86_64-linux-musl.gem
326e53ffb89d050eb00274945078ff7af9026594a7031874af4e9f172cf6154d  sqlite3-2.0.2.gem

2.0.1

2.0.1 / 2024-04-20

Fixed

  • Raise ArgumentError if Database#execute, #execute_batch, or #query are passed multiple bind parameters that are not in an Array. In v2.0.0 these methods would silently swallow additional arguments, and this change makes the failure explicit. See the CHANGELOG notes for v2.0.0 for examples on how to update your code. [#527] @flavorjones
  • Fixed a regression in v2.0.0 that caused Database#execute_batch to raise an encoding exception when passed some non-ascii strings. As a result of this fix, Database#prepare now ensures the "remainder" string will always be encoded as UTF-8. [#524] @flavorjones

sha256 checksums:

752cb885faf5e5d80b2fda5601b1168f1461e2e63e18c62cab8cf32fc4b05d8e  sqlite3-2.0.1-aarch64-linux-gnu.gem
637f90e5ec6d30b34fc49d7acc50b0f569d8c58699c2157e818e5e99c2594fcf  sqlite3-2.0.1-aarch64-linux-musl.gem
0ff1acf7e110c7bbfd140682f14926c5b2e84fe01620dc19ab4f6de1deadc1fd  sqlite3-2.0.1-arm-linux-gnu.gem
09d9f9723683a97a9454f593eecbf6c029670c4c0f7059fcfa62eb12e3d47b93  sqlite3-2.0.1-arm-linux-musl.gem
0efb2ca9d6c184c9960322b2a32ec86355f523b50089b0f26147b2abdfc94583  sqlite3-2.0.1-arm64-darwin.gem
937cc0c0668565c863c0e1736e3172726729a210a1a8fb59b857509ffd6ca835  sqlite3-2.0.1-x64-mingw-ucrt.gem
ee01997371e3dc3495f46dec9f1667a49fe65fe8f635edcd203048d639aa0948  sqlite3-2.0.1-x64-mingw32.gem
bf395f9b713811eb5d068056df986531038f79b5a3d49dfa42b1ac164c937c3b  sqlite3-2.0.1-x86-linux-gnu.gem
3082b2a19bfd7e33539c407adc646c58e5985b6344e192f715f04bb65cc82727  sqlite3-2.0.1-x86-linux-musl.gem
9fd4ee3d3aa6f1a4703abe0a5d247f31ae2757cb6a3be89664dfb714ba55d5b4  sqlite3-2.0.1-x86_64-darwin.gem
97cd463ea0f7e31e85814918ab70ebf4ca87b2b829d4664ea2787a39a6c4ffa6  sqlite3-2.0.1-x86_64-linux-gnu.gem
f6d1d84a49df5ba11a99998ee76dc004eeb3e4129037126ed085833cf471edda  sqlite3-2.0.1-x86_64-linux-musl.gem
6c5ff93b951ce521d8b3c6d05df46a15d97ec241c6cff5950c1a628ff7957922  sqlite3-2.0.1.gem

2.0.0

2.0.0 / 2024-04-17

This is a major release which contains some breaking changes, primarily the removal of
long-deprecated functionality. Before upgrading, please make sure to address deprecation warnings
emitted from your application using sqlite3-ruby v1.7.x.

Ruby

Packaging

Native (precompiled) gems are now available for Linux Musl. [#442] @flavorjones

Here are the platforms for which native gems are shipped:

  • aarch64-linux-gnu (requires: glibc >= 2.29)
  • aarch64-linux-musl
  • arm-linux-gnu (requires: glibc >= 2.29)
  • arm-linux-musl
  • arm64-darwin
  • x64-mingw32 / x64-mingw-ucrt
  • x86-linux-gnu (requires: glibc >= 2.17)
  • x86-linux-musl
  • x86_64-darwin
  • x86_64-linux-gnu (requires: glibc >= 2.17)
  • x86_64-linux-musl

⚠ Ruby 3.0 linux users must use Rubygems >= 3.3.22 in order to use these gems.

⚠ Musl linux users should update to Bundler >= 2.5.6 to avoid rubygems/rubygems#7432

See the INSTALLATION doc for more information.

Dependencies

Added

  • Database#busy_handler_timeout= introduced as an alternative to #busy_timeout= that can be used when it's desired to release the GVL between retries. [#443, #456] @fractaledmind
  • Support the SUPER_JOURNAL flag which is an alias for MASTER_JOURNAL as of sqlite 3.33.0. [#467] @flavorjones
  • Statement#stat and Statement#memused introduced to report statistics. [#461] @fractaledmind
  • Statement#sql and Statement#expanded_sql introduced to retrieve the SQL statement associated with the Statement object. [#293, #498] @tenderlove
  • SQLite3.status introduced to return run-time status and reset high-water marks. See SQLite3::Constants::Status for details. [#520] @wjlroe

Improved

Changed

  • Consistently use SQLite3::Exception or subclasses. Previously some Pragmas methods raised Exception, and Database#execute_batch2 and Database#load_extension raised RuntimeError. [#467, #490] @flavorjones
  • Database#columns returns a list of internal frozen strings. [#155, #474, #486] @tenderlove
  • Freeze results that come from the database. [#480] @tenderlove
  • The encoding of a Database is no longer cached. [#485] @tenderlove
  • Database#transaction returns the result of the block when used with a block. [#508] @alexcwatt
  • Database#execute_batch returns the result of the last statement executed. [#512] @alexcwatt

Removed

  • Removed class SQLite3::Translator and all related type translation methods which have been deprecated since v1.3.2. [#470] @tenderlove

    If you need to do type translation on values returned from the statement object, please wrap it
    with a delegate object. Here is an example of using a delegate class to implement type
    translation:

    require "sqlite3"
    require "delegate"
    

    db = SQLite3::Database.new(":memory:")

    return_value = db.execute_batch2 <<-EOSQL
    CREATE TABLE items (id integer PRIMARY KEY AUTOINCREMENT, name string);
    INSERT INTO items (name) VALUES ("foo");
    INSERT INTO items (name) VALUES ("bar");
    EOSQL

    class MyTranslator < DelegateClass(SQLite3::Statement)
    def step
    row = super
    return if done?

    <span class="pl-s1">row</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">.</span><span class="pl-en">with_index</span> <span class="pl-k">do</span> |<span class="pl-s1">item</span><span class="pl-kos">,</span> <span class="pl-s1">i</span>|
      <span class="pl-k">case</span> <span class="pl-en">types</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span>
      <span class="pl-k">when</span> <span class="pl-s">"integer"</span> <span class="pl-c"># turn all integers to floats</span>
        <span class="pl-s1">item</span><span class="pl-kos">.</span><span class="pl-en">to_f</span>
      <span class="pl-k">when</span> <span class="pl-s">"string"</span> <span class="pl-c"># add "hello" to all strings</span>
        <span class="pl-s1">item</span> + <span class="pl-s">"hello"</span>
      <span class="pl-k">end</span>
    <span class="pl-k">end</span>
    

    end
    end

    db.prepare("SELECT * FROM items") do |stmt|
    stmt = MyTranslator.new(stmt)
    while row = stmt.step
    p row
    end
    end

  • Removed types and fields readers on row objects, which have been deprecated since
    v1.3.6. [#471] @tenderlove

    Deprecated code looks like this:

    row = @db.execute("select * from foo")
    assert_equal ["blob"], row.first.types

    If you would like to access the "types" associated with a returned query,
    use a prepared statement like this:

    @db.prepare("select * from foo") do |v|
      assert_equal ["blob"], v.types
    end
  • Removed support for non-Array bind parameters to methods Database#execute, #execute_batch, and #query, which has been deprecated since v1.3.0. [#511] @flavorjones

    Deprecated code looks like this:

    @db.query("select * from foo where a = ? and b = ? and c = ?", 1, 2, 3)

    For these cases, pass the bind parameters as an array:

    @db.query("select * from foo where a = ? and b = ? and c = ?", [1, 2, 3])
  • Removed class SQLite3::VersionProxy which has been deprecated since v1.3.2. [#453] @flavorjones

  • Removed methods SQLite3::Database::FunctionProxy#count and #set_error which have been broken since at least v1.3.13. [#164, #509, #510] @alexcwatt @flavorjones


sha256 checksums:

c6720d3e695aab101058b20888784e45f0b060240d2265220ccf6905b3673c78  sqlite3-2.0.0-aarch64-linux-gnu.gem
c7941aa1fee7df021f023d77d980db887b400807c29b1ae321ad5c81678abe54  sqlite3-2.0.0-aarch64-linux-musl.gem
0e4f7e56a0569940c4d8ffd3bc56b9338f5ea93448bd6904dfaf4ba46f15ba9a  sqlite3-2.0.0-arm-linux-gnu.gem
a3950521c0e6a4e345069064cd8818ef2307e119eb8babf186893dd00de73838  sqlite3-2.0.0-arm-linux-musl.gem
4997a2530053565329ef0dee50178541626abb561eac2aff73efce2f86014e5e  sqlite3-2.0.0-arm64-darwin.gem
cc202af7f33e4e793c46b004827795a5c5cb90270eba2638b675d6be67380a87  sqlite3-2.0.0-x64-mingw-ucrt.gem
bb3c70fe0bcd64572b0d490f92735139b881442a295cf0d8bbca9eef9542c09e  sqlite3-2.0.0-x64-mingw32.gem
5e287bd13cbc7c2f824e29e90f181a41def579baab0bb4919b201087fb7067b7  sqlite3-2.0.0-x86-linux-gnu.gem
e07a4d3e92e843079f12f720152740c1eba70b07446cf1b597b824847ba8e395  sqlite3-2.0.0-x86-linux-musl.gem
356dbfeff65f0dd9ece1ac8a0bb057b3aa58a88a0187b64f7bbf6c6d6767ea43  sqlite3-2.0.0-x86_64-darwin.gem
5312d0f1bc1670c3223ec5c49906beead9b4dc797616dec37270d54b0e7de4b2  sqlite3-2.0.0-x86_64-linux-gnu.gem
df7dac50baaa93fc216903a09262d2d5141f09a60c74941df534ac53c7e7ff3a  sqlite3-2.0.0-x86_64-linux-musl.gem
f688e4aae13f60abb8f3a49d3fa23a814d3c6643b89fec96baef33602c8f4e07  sqlite3-2.0.0.gem

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Nov 26, 2024
@mitlib mitlib temporarily deployed to thesis-submit-pr-1393 November 26, 2024 22:18 Inactive
Copy link
Contributor Author

depfu bot commented Dec 5, 2024

Closed in favor of #1398.

@depfu depfu bot closed this Dec 5, 2024
Copy link
Contributor Author

depfu bot commented Dec 5, 2024

Closed in favor of #1398.

@depfu depfu bot deleted the depfu/update/sqlite3-2.3.1 branch December 5, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant