[PATCH v2 0/2] ruby: improve db.query

Subject: [PATCH v2 0/2] ruby: improve db.query

Date: Sun, 23 May 2021 21:19:08 -0500

To: notmuch@notmuchmail.org

Cc: Ludovic LANGE, Stefano Zacchiroli

From: Felipe Contreras


I find it a bit annoying to have to modify the query object to add
options when Notmuch::Database.query() can do that just fine.

This series also adds a mapping to the notmuch_exclude_t enum in order
to be able to specify NOTMUCH_EXCLUDE_ALL and others.

Nothing changed from v1 except rebased on master of May 23.

Felipe Contreras (2):
  ruby: add keyword arguments to db.query
  test: ruby: simplify basic tests

 bindings/ruby/database.c | 47 +++++++++++++++++++++++++++++++++++++---
 bindings/ruby/defs.h     |  2 +-
 bindings/ruby/init.c     |  2 +-
 test/T395-ruby.sh        | 30 ++++++++++++++++++-------
 4 files changed, 68 insertions(+), 13 deletions(-)

Range-diff against v1:
1:  8cc8cedd < -:  -------- ruby: use notmuch_exclude_t enum
2:  70938802 ! 1:  ec8b5d1a ruby: add keyword arguments to db.query
    @@ bindings/ruby/database.c: notmuch_rb_database_query_create (VALUE self, VALUE qs
     +	}
     +    }
     +
    -     return Data_Wrap_Struct (notmuch_rb_cQuery, NULL, NULL, query);
    +     return Data_Wrap_Notmuch_Object (notmuch_rb_cQuery, &notmuch_rb_query_type, query);
      }
     
      ## bindings/ruby/defs.h ##
3:  26519f68 = 2:  29c15ec1 test: ruby: simplify basic tests
-- 
2.32.0.rc0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: