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 [CCode (has_type_id = false)]
32 public enum Operator {
40 public Operator get_operator ();
41 public unowned Triple get_triple (int idx);
42 public void print (GLib.FileStream fh);
45 [CCode (cprefix = "RASQAL_EXPR_", has_type_id = false)]
59 [CCode (cname = "rasqal_expression", free_function = "rasqal_free_expression")]
60 public class Expression {
62 public Expression? arg1;
63 public Expression? arg2;
64 public Expression? arg3;
65 public Literal? literal;
69 [CCode (cname = "rasqal_literal", free_function = "rasqal_free_literal")]
70 public class Literal {
71 [CCode (cprefix = "RASQAL_LITERAL_", has_type_id = false)]
89 public unowned string? as_string ();
90 public unowned Variable? as_variable ();
94 [CCode (cname = "rasqal_query", free_function = "rasqal_free_query")]
96 [CCode (cname = "rasqal_new_query")]
97 public Query (string? name, string? uri);
98 public bool get_distinct ();
99 public int get_limit ();
100 public int get_offset ();
101 public unowned Expression? get_group_condition (int idx);
102 public unowned Expression? get_order_condition (int idx);
103 public unowned GraphPattern get_query_graph_pattern ();
104 public unowned Variable? get_variable (int idx);
105 public int prepare (string? query_string, Raptor.Uri? base_uri);
109 [CCode (cname = "rasqal_triple", free_function = "rasqal_free_triple")]
110 public class Triple {
111 public Literal subject;
112 public Literal predicate;
113 public Literal object;
114 public Literal origin;
116 public void print (GLib.FileStream fh);
120 [CCode (cname = "rasqal_variable", free_function = "rasqal_free_variable")]
121 public class Variable {
122 public weak string? name;
123 public Expression? expression;