Update schema and improve manual page MPSPARQL-29
[mp-sparql-moved-to-github.git] / src / sparql.h
1 #ifndef SPARQL_H_INCLUDED
2 #define SPARQL_H_INCLUDED
3
4 #include <yaz/wrbuf.h>
5 #include <yaz/z-core.h>
6 #include <yaz/nmem.h>
7
8 YAZ_BEGIN_CDECL
9
10 typedef struct yaz_sparql_s *yaz_sparql_t;
11
12 YAZ_EXPORT
13 yaz_sparql_t yaz_sparql_create(void);
14
15 YAZ_EXPORT
16 void yaz_sparql_destroy(yaz_sparql_t s);
17
18 YAZ_EXPORT
19 int yaz_sparql_add_pattern(yaz_sparql_t s, const char *pattern,
20                            const char *value);
21
22 YAZ_EXPORT
23 int yaz_sparql_from_rpn_stream(yaz_sparql_t s,
24                                WRBUF addinfo,
25                                void (*pr)(const char *buf,
26                                           void *client_data),
27                                void *client_data,
28                                Z_RPNQuery *q);
29
30 YAZ_EXPORT
31 int yaz_sparql_from_rpn_wrbuf(yaz_sparql_t s, WRBUF addinfo, WRBUF w,
32                               Z_RPNQuery *q);
33
34
35 YAZ_EXPORT
36 int yaz_sparql_from_uri_stream(yaz_sparql_t s,
37                                WRBUF addinfo,
38                                void (*pr)(const char *buf, void *client_data),
39                                void *client_data,
40                                const char *uri, const char *schema);
41
42 YAZ_EXPORT
43 int yaz_sparql_from_uri_wrbuf(yaz_sparql_t s, WRBUF addinfo, WRBUF w,
44                               const char *uri, const char *schema);
45
46 YAZ_EXPORT
47 int yaz_sparql_lookup_schema(yaz_sparql_t s, const char *schema);
48
49 YAZ_EXPORT
50 void yaz_sparql_include(yaz_sparql_t s, yaz_sparql_t u);
51
52 YAZ_EXPORT
53 void yaz_sparql_explain_indexes( yaz_sparql_t s, WRBUF w, int indent);
54
55 YAZ_END_CDECL
56
57 #endif
58 /* CQL_H_INCLUDED */
59 /*
60  * Local variables:
61  * c-basic-offset: 4
62  * c-file-style: "Stroustrup"
63  * indent-tabs-mode: nil
64  * End:
65  * vim: shiftwidth=4 tabstop=8 expandtab
66  */
67