Add limit_count and offset_count columns to query.stored_query table.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Jul 2010 12:44:49 +0000 (12:44 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Jul 2010 12:44:49 +0000 (12:44 +0000)
M    Open-ILS/src/sql/Pg/002.schema.config.sql
M    Open-ILS/src/sql/Pg/008.schema.query.sql
A    Open-ILS/src/sql/Pg/upgrade/0334.schema.query-limit-offset.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16917 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/008.schema.query.sql
Open-ILS/src/sql/Pg/upgrade/0334.schema.query-limit-offset.sql [new file with mode: 0644]

index 1ad2fb0..d8c3b01 100644 (file)
@@ -6796,6 +6796,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
                        <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
                        <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
+                       <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="int"/>
+                       <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="int"/>
                </fields>
                <links>
                </links>
index 2a29c95..ccdfc80 100644 (file)
@@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0333'); -- gmc
+INSERT INTO config.upgrade_log (version) VALUES ('0334'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 6fef65e..8c511f4 100644 (file)
@@ -38,8 +38,10 @@ CREATE TABLE  query.stored_query (
                                     --DEFERRABLE INITIALLY DEFERRED,
        where_clause  INT,           --REFERENCES query.expression
                                     --DEFERRABLE INITIALLY DEFERRED,
-       having_clause INT            --REFERENCES query.expression
+       having_clause INT,           --REFERENCES query.expression
                                     --DEFERRABLE INITIALLY DEFERRED
+       limit_count   INT,
+       offset_count  INT
 );
 
 -- (Foreign keys to be defined later after other tables are created)
diff --git a/Open-ILS/src/sql/Pg/upgrade/0334.schema.query-limit-offset.sql b/Open-ILS/src/sql/Pg/upgrade/0334.schema.query-limit-offset.sql
new file mode 100644 (file)
index 0000000..ef4f8ff
--- /dev/null
@@ -0,0 +1,11 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0334'); -- Scott McKellar
+
+ALTER TABLE query.stored_query
+ADD COLUMN limit_count INT;
+
+ALTER TABLE query.stored_query
+ADD COLUMN offset_count INT;
+
+COMMIT;