aboutsummaryrefslogtreecommitdiff
path: root/lib/osugiru/database.rb
blob: d014c944ad838e3122cfc1a9187946c7d98640cd (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)
    end

    def query(query)
      db.query(query)
    end

    def search_messages(query)
      query(query).search_messages
    end
  end
end