Class: ZOOM::Query

Inherits:
Object
  • Object
show all
Defined in:
ext/rbzoomquery.c

Class Method Summary collapse

Class Method Details

.new_cql(prefix) ⇒ Object

prefix: CQL notation.

Creates a CQL query using the given CQL notation.

Returns: a newly created ZOOM::Query object.



81
82
83
84
85
86
87
88
89
90
# File 'ext/rbzoomquery.c', line 81

static VALUE
rbz_query_new_cql (VALUE self, VALUE cql)
{
    ZOOM_query query;

    query = ZOOM_query_create ();
    ZOOM_query_cql (query, RVAL2CSTR (cql)); 
    
    return rbz_query_make (query);
}

.new_prefix(prefix) ⇒ Object

prefix: PQF notation.

Creates a RPN query using the given PQF notation.

Returns: a newly created ZOOM::Query object.



61
62
63
64
65
66
67
68
69
70
# File 'ext/rbzoomquery.c', line 61

static VALUE
rbz_query_new_prefix (VALUE self, VALUE prefix)
{
    ZOOM_query query;

    query = ZOOM_query_create ();
    ZOOM_query_prefix (query, RVAL2CSTR (prefix)); 
    
    return rbz_query_make (query);
}

.new_sort_by(criteria) ⇒ Object

criteria: a sort criteria.

Creates a sort query from the YAZ sorting notation.

Returns: a newly created ZOOM::Query object.



101
102
103
104
105
106
107
108
109
110
# File 'ext/rbzoomquery.c', line 101

static VALUE
rbz_query_new_sort_by (VALUE self, VALUE criteria)
{
    ZOOM_query query;

    query = ZOOM_query_create ();
    ZOOM_query_sortby (rbz_query_get (self), RVAL2CSTR (criteria)); 
    
    return rbz_query_make (query);
}