Expose sqlite3_changes (or sqlite3_changes64 if available)

This commit is contained in:
Thom Chiovoloni
2022-04-03 08:13:27 -07:00
parent f8b9ad8907
commit 899784379b
3 changed files with 13 additions and 7 deletions

View File

@@ -1,5 +1,9 @@
//! Rusqlite is an ergonomic wrapper for using SQLite from Rust. It attempts to
//! expose an interface similar to [rust-postgres](https://github.com/sfackler/rust-postgres).
//! Rusqlite is an ergonomic wrapper for using SQLite from Rust.
//!
//! Historically, the API was based on the one from
//! [`rust-postgres`](https://github.com/sfackler/rust-postgres). However, the
//! two have diverged in many ways, and no compatibility between the two is
//! intended.
//!
//! ```rust
//! use rusqlite::{params, Connection, Result};
@@ -901,8 +905,10 @@ impl Connection {
/// Return the number of rows modified, inserted or deleted by the most
/// recently completed INSERT, UPDATE or DELETE statement on the database
/// connection.
///
/// See <https://www.sqlite.org/c3ref/changes.html>
#[inline]
fn changes(&self) -> usize {
pub fn changes(&self) -> u64 {
self.db.borrow().changes()
}