[open-ils-commits] r16409 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon May 10 10:52:08 EDT 2010
Author: scottmk
Date: 2010-05-10 10:52:05 -0400 (Mon, 10 May 2010)
New Revision: 16409
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
Log:
Add table query.bind_variable.
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/0254.schema.query-bind-variable.sql
M Open-ILS/examples/fm_IDL.xml
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-05-08 20:17:42 UTC (rev 16408)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-05-10 14:52:05 UTC (rev 16409)
@@ -6578,6 +6578,19 @@
</permacrud>
</class>
+ <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
+ <fields oils_persist:primary="name">
+ <field reporter:label="Name" name="name" reporter:datatype="id"/>
+ <field reporter:label="Type" name="type" reporter:datatype="text"/>
+ <field reporter:label="Description" name="description" reporter:datatype="text"/>
+ <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
+ </fields>
+ <links>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ </permacrud>
+ </class>
+
<class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
<fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
<field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-05-08 20:17:42 UTC (rev 16408)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-05-10 14:52:05 UTC (rev 16409)
@@ -65,7 +65,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0253'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0254'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/008.schema.query.sql 2010-05-08 20:17:42 UTC (rev 16408)
+++ trunk/Open-ILS/src/sql/Pg/008.schema.query.sql 2010-05-10 14:52:05 UTC (rev 16409)
@@ -110,6 +110,15 @@
CONSTRAINT qfpd_function_param_seq UNIQUE (function_id, seq_no)
);
+CREATE TABLE query.bind_variable (
+ name TEXT PRIMARY KEY,
+ type TEXT NOT NULL
+ CONSTRAINT bind_variable_type CHECK
+ ( type in ( 'string', 'number', 'string_list', 'number_list' )),
+ description TEXT NOT NULL,
+ default_value TEXT -- to be encoded in JSON
+);
+
CREATE TABLE query.expression (
id SERIAL PRIMARY KEY,
type TEXT NOT NULL CONSTRAINT predicate_type CHECK
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql 2010-05-10 14:52:05 UTC (rev 16409)
@@ -0,0 +1,14 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0254'); -- Scott McKellar
+
+CREATE TABLE query.bind_variable (
+ name TEXT PRIMARY KEY,
+ type TEXT NOT NULL
+ CONSTRAINT bind_variable_type CHECK
+ ( type in ( 'string', 'number', 'string_list', 'number_list' )),
+ description TEXT NOT NULL,
+ default_value TEXT -- to be encoded in JSON
+);
+
+COMMIT;
More information about the open-ils-commits
mailing list