mirror of
https://github.com/isar/rusqlite.git
synced 2025-01-20 22:40:52 +08:00
Rustfmt
This commit is contained in:
parent
59872a1850
commit
6fb549420b
@ -353,7 +353,9 @@ impl<'a> Context<'a> {
|
||||
///
|
||||
/// `A` is the type of the aggregation context and `T` is the type of the final result.
|
||||
/// Implementations should be stateless.
|
||||
pub trait Aggregate<A, T> where T: ToResult {
|
||||
pub trait Aggregate<A, T>
|
||||
where T: ToResult
|
||||
{
|
||||
/// Initializes the aggregation context. Will be called prior to the first call
|
||||
/// to `step()` to set up the context for an invocation of the function. (Note:
|
||||
/// `init()` will not be called if the there are no rows.)
|
||||
|
@ -950,7 +950,8 @@ pub struct MappedRows<'stmt, F> {
|
||||
map: F,
|
||||
}
|
||||
|
||||
impl<'stmt, T, F> Iterator for MappedRows<'stmt, F> where F: FnMut(&Row) -> T
|
||||
impl<'stmt, T, F> Iterator for MappedRows<'stmt, F>
|
||||
where F: FnMut(&Row) -> T
|
||||
{
|
||||
type Item = Result<T>;
|
||||
|
||||
|
@ -18,11 +18,19 @@ pub fn load_module(conn: &Connection) -> Result<()> {
|
||||
conn.create_module("csv", &CSV_MODULE, aux)
|
||||
}
|
||||
|
||||
init_module!(CSV_MODULE, CSVTab, CSVTabCursor,
|
||||
csv_create, csv_best_index, csv_destroy,
|
||||
csv_open, csv_close,
|
||||
csv_filter, csv_next, csv_eof,
|
||||
csv_column, csv_rowid);
|
||||
init_module!(CSV_MODULE,
|
||||
CSVTab,
|
||||
CSVTabCursor,
|
||||
csv_create,
|
||||
csv_best_index,
|
||||
csv_destroy,
|
||||
csv_open,
|
||||
csv_close,
|
||||
csv_filter,
|
||||
csv_next,
|
||||
csv_eof,
|
||||
csv_column,
|
||||
csv_rowid);
|
||||
|
||||
#[repr(C)]
|
||||
struct CSVTab {
|
||||
|
@ -29,11 +29,19 @@ pub fn drop_int_array(conn: &Connection, name: &str) -> Result<()> {
|
||||
conn.execute_batch(&format!("DROP TABLE temp.\"{0}\"", escape_double_quote(name)))
|
||||
}
|
||||
|
||||
init_module!(INT_ARRAY_MODULE, IntArrayVTab, IntArrayVTabCursor,
|
||||
int_array_create, int_array_best_index, int_array_destroy,
|
||||
int_array_open, int_array_close,
|
||||
int_array_filter, int_array_next, int_array_eof,
|
||||
int_array_column, int_array_rowid);
|
||||
init_module!(INT_ARRAY_MODULE,
|
||||
IntArrayVTab,
|
||||
IntArrayVTabCursor,
|
||||
int_array_create,
|
||||
int_array_best_index,
|
||||
int_array_destroy,
|
||||
int_array_open,
|
||||
int_array_close,
|
||||
int_array_filter,
|
||||
int_array_next,
|
||||
int_array_eof,
|
||||
int_array_column,
|
||||
int_array_rowid);
|
||||
|
||||
#[repr(C)]
|
||||
struct IntArrayVTab {
|
||||
|
Loading…
x
Reference in New Issue
Block a user