aboutsummaryrefslogtreecommitdiffstats
path: root/src/query.rs
blob: 364c001b3cb432394682c93bc5953f610deecda4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use std::{
    ops,
    path,
    ptr,
};

use std::ffi::CString;
use std::os::raw::c_char;

use libc;

use error::Result;
use utils::{
    NewFromPtr,
    ToStr,
};

use ffi;

use database::Database;

#[derive(Debug)]
pub struct Query(pub(crate) *mut ffi::notmuch_query_t);

impl Query {
    pub fn create(db: &Database, query_string: &String) -> Result<Self> {
        db.create_query(query_string)
    }
}