Add Rows::map method

This commit is contained in:
gwenn
2019-03-10 12:58:20 +01:00
parent 59a44cfae5
commit 71a2004894
7 changed files with 49 additions and 25 deletions

View File

@@ -10,13 +10,13 @@ use std::panic::{catch_unwind, RefUnwindSafe};
use std::ptr;
use std::slice::{from_raw_parts, from_raw_parts_mut};
use fallible_streaming_iterator::FallibleStreamingIterator;
use crate::error::error_from_sqlite_code;
use crate::ffi;
use crate::hooks::Action;
use crate::types::ValueRef;
use crate::{
errmsg_to_string, str_to_cstring, Connection, DatabaseName, FallibleStreamingIterator, Result,
};
use crate::{errmsg_to_string, str_to_cstring, Connection, DatabaseName, Result};
// https://sqlite.org/session.html
@@ -720,10 +720,11 @@ unsafe extern "C" fn x_output(p_out: *mut c_void, data: *const c_void, len: c_in
#[cfg(test)]
mod test {
use std::sync::atomic::{AtomicBool, Ordering};
use fallible_streaming_iterator::FallibleStreamingIterator;
use super::{Changeset, ChangesetIter, ConflictAction, ConflictType, Session};
use crate::hooks::Action;
use crate::{Connection, FallibleStreamingIterator};
use crate::Connection;
fn one_changeset() -> Changeset {
let db = Connection::open_in_memory().unwrap();