[Lada-commits] [PATCH 01 of 11] Added filter attribute and added comments

Wald Commits scm-commit at wald.intevation.org
Wed Jul 24 15:27:57 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1374581685 -7200
# Node ID 7097182150d92f4899207558c904ddbadb3df203
# Parent  331c77afdbcb89615a6963787f74fcc0488256a2
Added filter attribute and added comments.

diff -r 331c77afdbcb -r 7097182150d9 app/model/Query.js
--- a/app/model/Query.js	Tue Jul 23 11:45:10 2013 +0200
+++ b/app/model/Query.js	Tue Jul 23 14:14:45 2013 +0200
@@ -6,6 +6,7 @@
         {name: "description"},
         {name: "sql"},
         {name: "fields"},
+        {name: "filters"},
     ],
     proxy: {
         type: 'memory',
diff -r 331c77afdbcb -r 7097182150d9 app/store/Queries.js
--- a/app/store/Queries.js	Tue Jul 23 11:45:10 2013 +0200
+++ b/app/store/Queries.js	Tue Jul 23 14:14:45 2013 +0200
@@ -24,14 +24,20 @@
             'name': 'MST, UWB',
             'description': 'Beschreibung der MST, UWB Abfrage',
             'sql': 'select * from xxx',
-            'fields': ['datenbasisId', 'mplId', 'umwId', 'messmethode', 'hauptprobenNr', 'nebenprobenNr', 'bezeichnung', 'kreis', 'probeId', 'mstId']
+            /* List of fields which should be displayed in the proben list.
+             * The field names must match the fieldnames in returned JSON object. */
+            'fields': ['datenbasisId', 'mplId', 'umwId', 'messmethode', 'hauptprobenNr', 'nebenprobenNr', 'bezeichnung', 'kreis', 'probeId', 'mstId'],
+            /* List of filters. The filters must match the fields in the
+             * "WHERE" part of the defined SQL query. */
+            'filters': ['mstId', 'umwId'],
         },
         {
             'id': '2',
             'name': 'Rbegin',
             'description': 'Beschreibung der Rbegin Abfrage',
             'sql': 'select * from xxx',
-            'fields': ['mplId', 'datenbasisId', 'umwId', 'messmethode', 'hauptprobenNr', 'nebenprobenNr', 'bezeichnung', 'kreis', 'probeId', 'mstId']
+            'fields': ['mplId', 'datenbasisId', 'umwId', 'messmethode', 'hauptprobenNr', 'nebenprobenNr', 'bezeichnung', 'kreis', 'probeId', 'mstId'],
+            'filters': [],
         }
     ],
 });


More information about the Lada-commits mailing list