mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-06 01:39:24 +08:00
14 KiB
14 KiB
Version 0.13.0 (2017-11-13)
- Added ToSqlConversionFailure case to Error enum.
- Now depends on chrono 0.4, bitflats 1.0, and (optionally) cc 1.0 / bindgen 0.31.
- The ToSql/FromSql implementations for time::Timespec now include and expect fractional seconds and timezone in the serialized string.
- The RowIndex type used in Row::get is now publicly exported.
- New
sqlcipherfeature allows linking against SQLCipher instead of SQLite. - Doc link in README now point to docs.rs.
Version 0.12.0 (2017-05-29)
- Defines HAVE_USLEEP when building with a bundled SQLite (#263).
- Updates dependencies to their latest versions, particularly serde to 1.0.
- Adds support for vcpkg on Windows.
- Adds
ToSqlimpls forstrand[u8].
Version 0.11.0 (2017-04-06)
- Avoid publicly exporting SQLite constants multiple times from libsqlite3-sys.
- Adds
FromSqlandToSqlimpls forisize. Documents whyusizeandu64are not included.
Version 0.10.1 (2017-03-03)
- Updates the
bundledSQLite version to 3.17.0. - Changes the build process to no longer require
bindgen. This should improve build times and no longer require a new-ish Clang. See the README for more details.
Version 0.10.0 (2017-02-28)
- Re-export the
ErrorCodeenum fromlibsqlite3-sys. - Adds
version()andversion_number()functions for querying the version of SQLite in use. - Adds the
limitsfeature, exposinglimit()andset_limit()methods onConnection. - Updates to
libsqlite3-sys0.7.0, which runs rust-bindgen at build-time instead of assuming the precense of all expected SQLite constants and functions. - Clarifies supported SQLite versions. Running with SQLite older than 3.6.8 now panics, and some features will not compile unless a sufficiently-recent SQLite version is used. See the README for requirements of particular features.
- When running with SQLite 3.6.x, rusqlite attempts to perform SQLite initialization. If it fails,
rusqlite will panic since it cannot ensure the threading mode for SQLite. This check can by
skipped by calling the unsafe function
rusqlite::bypass_sqlite_initialization(). This is technically a breaking change but is unlikely to affect anyone in practice, since prior to this version the check that rusqlite was using would cause a segfault if linked against a SQLite older than 3.7.0. - rusqlite now performs a one-time check (prior to the first connection attempt) that the runtime
SQLite version is at least as new as the SQLite version found at buildtime. This check can by
skipped by calling the unsafe function
rusqlite::bypass_sqlite_version_check(). - Removes the
libcdependency in favor of usingstd::os::raw
Version 0.9.5 (2017-01-26)
- Add impls of
Clone,Debug, andPartialEqtoToSqlOutput.
Version 0.9.4 (2017-01-25)
- Update dependencies.
Version 0.9.3 (2017-01-23)
- Make
ToSqlOutputitself implementToSql.
Version 0.9.2 (2017-01-22)
- Bugfix: The
FromSqlimpl fori32now returns an error instead of truncating if the underlying SQLite value is out ofi32's range. - Added
FromSqlandToSqlimpls fori8,i16,u8,u16, andu32.i32andi64already had impls.u64is omitted because their range cannot be represented byi64, which is the type we use to communicate with SQLite.
Version 0.9.1 (2017-01-20)
- BREAKING CHANGE:
Connection::close()now returns aResult<(), (Connection, Error)>instead of aResult<(), Error>so callers get the still-open connection back on failure.
Version 0.8.0 (2016-12-31)
- BREAKING CHANGE: The
FromSqltrait has been redesigned. It now requires a single, safe method instead of the previous definition which required implementing one or two unsafe methods. - BREAKING CHANGE: The
ToSqltrait has been redesigned. It can now be implemented withoutunsafe, and implementors can choose to return either borrowed or owned results. - BREAKING CHANGE: The closure passed to
query_row,query_row_and_then,query_row_safe, andquery_row_namednow expects a&Rowinstead of aRow. The vast majority of calls to these functions will probably not need to change; see https://github.com/jgallagher/rusqlite/pull/184. - BREAKING CHANGE: A few cases of the
Errorenum have sprouted additional information (e.g.,FromSqlConversionFailurenow also includes the column index and the type returned by SQLite). - Added
#[deprecated(since = "...", note = "...")]flags (new in Rust 1.9 for libraries) to all deprecated APIs. - Added
query_rowconvenience function toStatement. - Added
bundledfeature which will build SQLite from source instead of attempting to link against a SQLite that already exists on the system. - Fixed a bug where using cached prepared statements resulted in attempting to close a connection
failing with
DatabaseBusy; see https://github.com/jgallagher/rusqlite/issues/186.
Version 0.7.3 (2016-06-01)
- Fixes an incorrect failure from the
insert()convenience function when back-to-back inserts to different tables both returned the same row ID (#171).
Version 0.7.2 (2016-05-19)
- BREAKING CHANGE:
Rowsno longer implementsIterator. It still has anext()method, but the lifetime of the returnedRowis now tied to the lifetime of the vendingRowsobject. This behavior is more correct. Previously there were runtime checks to prevent misuse, but other changes in this release to reset statements as soon as possible introduced yet another hazard related to the lack of these lifetime connections. We were already recommending the use ofquery_mapandquery_and_thenover rawquery; both of theose still return handles that implementIterator. - BREAKING CHANGE:
Transaction::savepoint()now returns aSavepointinstead of anotherTransaction. UnlikeTransaction,Savepoints can be rolled back while keeping the current savepoint active. - BREAKING CHANGE: Creating transactions from a
Connectionor savepoints from aTransactionnow take&mut selfinstead of&selfto correctly represent that transactions within a connection are inherently nested. While a transaction is alive, the parent connection or transaction is unusable, soTransactionnow implementsDeref<Target=Connection>, giving access toConnection's methods via theTransactionitself. - BREAKING CHANGE:
Transaction::set_commitandTransaction::set_rollbackhave been replaced byTransaction::set_drop_behavior. - Adds
Connection::prepare_cached.Connectionnow keeps an internal cache of any statements prepared via this method. The size of this cache defaults to 16 (prepare_cachedwill always work but may re-prepare statements if more are prepared than the cache holds), and can be controlled viaConnection::set_prepared_statement_cache_capacity. - Adds
query_map_namedandquery_and_then_namedtoStatement. - Adds
insertconvenience method toStatementwhich returns the row ID of an inserted row. - Adds
existsconvenience method returning whether a query finds one or more rows. - Adds support for serializing types from the
serde_jsoncrate. Requires theserde_jsonfeature. - Adds support for serializing types from the
chronocrate. Requires thechronofeature. - Removes
load_extensionfeature fromlibsqlite3-sys.load_extensionis still available on rusqlite itself. - Fixes crash on nightly Rust when using the
tracefeature. - Adds optional
clippyfeature and addresses issues it found. - Adds
column_count()method toStatementandRow. - Adds
types::Valuefor dynamic column types. - Adds support for user-defined aggregate functions (behind the existing
functionsCargo feature). - Introduces a
RowIndextrait allowing columns to be fetched via index (as before) or name (new). - Introduces
ZeroBlobtype under theblobmodule/feature exposing SQLite's zeroblob API. - Adds CI testing for Windows via AppVeyor.
- Fixes a warning building libsqlite3-sys under Rust 1.6.
- Adds an unsafe
handle()method toConnection. Please file an issue if you actually use it.
Version 0.6.0 (2015-12-17)
- BREAKING CHANGE:
SqliteErroris now an enum instead of a struct. Previously, we were (ab)using the error code and message to send back both underlying SQLite errors and errors that occurred at the Rust level. Now those have been separated out; SQLite errors are returned asSqliteFailurecases (which still include the error code but also include a Rust-friendlier enum as well), and rusqlite-level errors are captured in other cases. Because of this change,SqliteErrorno longer implementsPartialEq. - BREAKING CHANGE: When opening a new detection, rusqlite now detects if SQLite was compiled or configured for single-threaded use only; if it was, connection attempts will fail. If this affects you, please open an issue.
- BREAKING CHANGE:
SqliteTransactionDeferred,SqliteTransactionImmediate, andSqliteTransactionExclusiveare no longer exported. Instead, useTransactionBehavior::Deferred,TransactionBehavior::Immediate, andTransactionBehavior::Exclusive. - Removed
Sqliteprefix on many types:SqliteConnectionis nowConnectionSqliteErroris nowErrorSqliteResultis nowResultSqliteStatementis nowStatementSqliteRowsis nowRowsSqliteRowis nowRowSqliteOpenFlagsis nowOpenFlagsSqliteTransactionis nowTransaction.SqliteTransactionBehavioris nowTransactionBehavior.SqliteLoadExtensionGuardis nowLoadExtensionGuard. The old, prefixed names are still exported but are deprecated.
- Adds a variety of
..._namedmethods for executing queries using named placeholder parameters. - Adds
backupfeature that exposes SQLite's online backup API. - Adds
blobfeature that exposes SQLite's Incremental I/O for BLOB API. - Adds
functionsfeature that allows user-defined scalar functions to be added to openSqliteConnections.
Version 0.5.0 (2015-12-08)
- Adds
tracefeature that allows the use of SQLite's logging, tracing, and profiling hooks. - Slight change to the closure types passed to
query_mapandquery_and_then:- Remove the
'staticrequirement on the closure's output type. - Give the closure a
&SqliteRowinstead of aSqliteRow.
- Remove the
- When building, the environment variable
SQLITE3_LIB_DIRnow takes precedence over pkg-config. - If
pkg-configis not available, we will try to findlibsqlite3in/usr/lib. - Add more documentation for failure modes of functions that return
SqliteResults. - Updates
libcdependency to 0.2, fixing builds on ARM for Rust 1.6 or newer.
Version 0.4.0 (2015-11-03)
- Adds
Sizedbound toFromSqltrait as required by RFC 1214.
Version 0.3.1 (2015-09-22)
- Reset underlying SQLite statements as soon as possible after executing, as recommended by http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor.
Version 0.3.0 (2015-09-21)
- Removes
get_opt. Useget_checkedinstead. - Add
query_row_and_thenandquery_and_thenconvenience functions. These are analogous toquery_rowandquery_mapbut allow functions that can fail by returningResults. - Relax uses of
P: AsRef<...>from&PtoP. - Add additional error check for calling
executewhenquerywas intended. - Improve debug formatting of
SqliteStatementandSqliteConnection. - Changes documentation of
get_checkedto correctly indicate that it returns errors (not panics) when given invalid types or column indices.
Version 0.2.0 (2015-07-26)
- Add
column_names()toSqliteStatement. - By default, include
SQLITE_OPEN_NO_MUTEXandSQLITE_OPEN_URIflags when opening a new conneciton. - Fix generated bindings (e.g.,
sqlite3_execwas wrong). - Use now-generated
sqlite3_destructor_typeto defineSQLITE_STATICandSQLITE_TRANSIENT.
Version 0.1.0 (2015-05-11)
- [breaking-change] Modify
query_rowto return aResultinstead of unwrapping. - Deprecate
query_row_safe(usequery_rowinstead). - Add
query_map. - Add
get_checked, which asks SQLite to do some basic type-checking of columns.
Version 0.0.17 (2015-04-03)
- Publish version that builds on stable rust (beta). This version lives on the
stablebranch. Development continues onmasterand still requires a nightly version of Rust.
Version 0.0.16
- Updates to track rustc nightly.
Version 0.0.15
- Make SqliteConnection
Send.
Version 0.0.14
- Remove unneeded features (also involves switching to
libccrate).
Version 0.0.13 (2015-03-26)
- Updates to track rustc nightly.
Version 0.0.12 (2015-03-24)
- Updates to track rustc stabilization.
Version 0.0.11 (2015-03-12)
- Reexport
sqlite3_stmtfromlibsqlite3-sysfor easierimpl-ing ofToSqlandFromSql. - Updates to track latest rustc changes.
- Update dependency versions.
Version 0.0.10 (2015-02-23)
- BREAKING CHANGE:
opennow expects aPathrather than astr. There is a separateopen_in_memoryconstructor for opening in-memory databases. - Added the ability to load SQLite extensions. This is behind the
load_extensionCargo feature, because not all builds of sqlite3 include this ability. Notably the default libsqlite3 that ships with OS X 10.10 does not support extensions.
Version 0.0.9 (2015-02-13)
- Updates to track latest rustc changes.
- Implement standard
Errortrait forSqliteError.
Version 0.0.8 (2015-02-04)
- Updates to track latest rustc changes.
Version 0.0.7 (2015-01-20)
- Use external bitflags from crates.io.
Version 0.0.6 (2015-01-10)
- Updates to track latest rustc changes (1.0.0-alpha).
- Add
query_row_safe, aSqliteResult-returning variant ofquery_row.
Version 0.0.5 (2015-01-07)
- Updates to track latest rustc changes (closure syntax).
- Updates to track latest rust stdlib changes (
std::c_str->std::ffi).
Version 0.0.4 (2015-01-05)
- Updates to track latest rustc changes.
Version 0.0.3 (2014-12-23)
- Updates to track latest rustc changes.
- Add call to
sqlite3_busy_timeout.
Version 0.0.2 (2014-12-04)
- Remove use of now-deprecated
std::vec::raw::from_buf. - Update to latest version of
timecrate.
Version 0.0.1 (2014-11-21)
- Initial release