blob: 0d33a2434feaae9303dfc63b599077d8a0e7c6af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
module Osugiru
class Database
attr_reader :db
def initialize(path:)
@db = ::Notmuch::Database.new(path, mode: Notmuch::MODE_READ_WRITE)
end
def query(query)
db.query(query)
end
def search_messages(query)
query(query).search_messages
end
end
end
|