aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/ruby/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ruby/query.c')
-rw-r--r--bindings/ruby/query.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/bindings/ruby/query.c b/bindings/ruby/query.c
index c5b8a4cc..ef9e1a07 100644
--- a/bindings/ruby/query.c
+++ b/bindings/ruby/query.c
@@ -39,6 +39,21 @@ notmuch_rb_query_destroy(VALUE self)
}
/*
+ * call-seq: QUERY.sort => fixnum
+ *
+ * Get sort type of the +QUERY+
+ */
+VALUE
+notmuch_rb_query_get_sort(VALUE self)
+{
+ notmuch_query_t *query;
+
+ Data_Get_Notmuch_Query(self, query);
+
+ return FIX2INT(notmuch_query_get_sort(query));
+}
+
+/*
* call-seq: QUERY.sort=(fixnum) => nil
*
* Set sort type of the +QUERY+
@@ -59,6 +74,21 @@ notmuch_rb_query_set_sort(VALUE self, VALUE sortv)
}
/*
+ * call-seq: QUERY.to_s => string
+ *
+ * Get query string of the +QUERY+
+ */
+VALUE
+notmuch_rb_query_get_string(VALUE self)
+{
+ notmuch_query_t *query;
+
+ Data_Get_Notmuch_Query(self, query);
+
+ return rb_str_new2(notmuch_query_get_query_string(query));
+}
+
+/*
* call-seq: QUERY.search_threads => THREADS
*
* Search for threads