]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/TechRef/qstore/README
LP#1678638: technical documentation for qstore
[Evergreen.git] / docs / TechRef / qstore / README
1 This archive includes documentation of the query schema and the
2 qstore server, along with some examples of stored queries.
3
4 The query schema stores database queries in an abstract form
5 within the database itself.
6
7 The qstore server loads queries from the query schema, constructs
8 the corresponding SQL, and executes the queries.
9
10 Table of contents:
11
12 qstore.odt
13
14         Documentation of the qstore methods.
15
16 query_dump.sh
17
18         A shell script used to generate query_dump.sql, using the
19         pg_dump utility.  I include this script mostly for my own
20         convenience in case I want to update this archive, but you may
21         find it useful to know exactly where the sql script came from.
22         (Note: after generating the sql script I manually edited it to
23         remove the loading of the datatype table.)
24
25 query_dump.sql
26
27         An sql script to install a collection of examples.  The script
28         assumes that the query schema exists but has no data in it,
29         except for the datatypes in query.datatype as installed by
30         the installation script.
31
32 query_schema.odt
33
34         Documentation of the query schema.
35
36 README
37
38         You're looking at it.
39
40 stored_queries.txt
41
42         SQL queries generated from the queries loaded by query_dump.sql.
43
44 test_qstore.txt
45
46         Documentation of the test_qstore utility.  The same documentation
47         appears in a comment block at the top of test_qstore.c.
48
49 The sql script loads 25 example queries, with query ids in the range 1-25.  
50 These are the queries I used to develop and test qstore.  I used
51 the test_qstore utility to generate each query, and then pasted the
52 output into stored_queries.txt.
53
54 The queries themselves are not particularly useful, and often don't
55 even make much sense from an application standpoint.  They are just
56 exercises in the generation of syntax.  In any case they all run
57 successfully within psql (except for query # 12, which features
58 an unsubstituted bind variable).
59
60 Scott McKellar