3 * Copyright (C) 2008 Nokia
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Jürg Billeter <j@bitron.ch>
23 [CCode (cheader_filename = "rasqal.h")]
26 public void finish ();
29 [CCode (cname = "rasqal_graph_pattern")]
30 public class GraphPattern {
31 public enum Operator {
39 public Operator get_operator ();
40 public unowned Triple get_triple (int idx);
41 public void print (GLib.FileStream fh);
44 [CCode (cprefix = "RASQAL_EXPR_")]
58 [CCode (cname = "rasqal_expression", free_function = "rasqal_free_expression")]
59 public class Expression {
61 public Expression? arg1;
62 public Expression? arg2;
63 public Expression? arg3;
64 public Literal? literal;
68 [CCode (cname = "rasqal_literal", free_function = "rasqal_free_literal")]
69 public class Literal {
70 [CCode (cprefix = "RASQAL_LITERAL_")]
88 public unowned string? as_string ();
89 public unowned Variable? as_variable ();
93 [CCode (cname = "rasqal_query", free_function = "rasqal_free_query")]
95 [CCode (cname = "rasqal_new_query")]
96 public Query (string? name, string? uri);
97 public bool get_distinct ();
98 public int get_limit ();
99 public int get_offset ();
100 public unowned Expression? get_group_condition (int idx);
101 public unowned Expression? get_order_condition (int idx);
102 public unowned GraphPattern get_query_graph_pattern ();
103 public unowned Variable? get_variable (int idx);
104 public int prepare (string? query_string, Raptor.Uri? base_uri);
108 [CCode (cname = "rasqal_triple", free_function = "rasqal_free_triple")]
109 public class Triple {
110 public Literal subject;
111 public Literal predicate;
112 public Literal object;
113 public Literal origin;
115 public void print (GLib.FileStream fh);
119 [CCode (cname = "rasqal_variable", free_function = "rasqal_free_variable")]
120 public class Variable {
121 public weak string? name;
122 public Expression? expression;