You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.
The query builder plugin throws an error if you choose a field with date type and the comparison ("=") or the contains ("beinhaltet") operator. See the attached image.
The error that mapserver returns:
comparison operator: <ows:ExceptionText>msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. Error (ERROR: function lower(date) does not exist LINE 1: ... 278000,690000 218000,620000 218000))',-1) and ( (lower("dat... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ) executing query: select "id","time","name","vorname","adresse_form","plz","ort","email","telefon","zweck","meta_title","meta_comment","meta_layout","meta_scale","meta_rotation","meta_layers","meta_center_x","meta_center_y","meta_pdf_name","datum","zeit","meta_pdf_link",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from (SELECT geo.* FROM stat.view_printlog AS geo) AS foo where geom && GeomFromText('POLYGON((620000 218000,620000 278000,690000 278000,690000 218000,620000 218000))',-1) and ( (lower("datum") = lower('2015-08-31T00:00:00+02:00') ) ) msEvalRegex(): Regular expression error. String failed expression test.</ows:ExceptionText> </ows:Exception>
contains operator: <ows:ExceptionText>msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. Error (ERROR: operator does not exist: date ~~* text LINE 1: ...690000 218000,620000 218000))',-1) and ( ("datum" ilike '%20... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. ) executing query: select "id","time","name","vorname","adresse_form","plz","ort","email","telefon","zweck","meta_title","meta_comment","meta_layout","meta_scale","meta_rotation","meta_layers","meta_center_x","meta_center_y","meta_pdf_name","datum","zeit","meta_pdf_link",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from (SELECT geo.* FROM stat.view_printlog AS geo) AS foo where geom && GeomFromText('POLYGON((620000 218000,620000 278000,690000 278000,690000 218000,620000 218000))',-1) and ( ("datum" ilike '%2015-08-31T00:00:00+02:00%' escape '!') )</ows:ExceptionText> </ows:Exception>
I think the "contains operator" does not make sense on a date type field and therefore it should not be displayed for the user.
The text was updated successfully, but these errors were encountered:
the QueryBuilder has no understanding of the field type, in this case date or timestamp, and therefor cant filter out operator.
it may be possible to implement such filtering but at the price of a high increase of the complexity of the code.
you should check with the community if there is a will to finance that.
The query builder plugin throws an error if you choose a field with date type and the comparison ("=") or the contains ("beinhaltet") operator. See the attached image.
The error that mapserver returns:
comparison operator:
<ows:ExceptionText>msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. Error (ERROR: function lower(date) does not exist LINE 1: ... 278000,690000 218000,620000 218000))',-1) and ( (lower("dat... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ) executing query: select "id","time","name","vorname","adresse_form","plz","ort","email","telefon","zweck","meta_title","meta_comment","meta_layout","meta_scale","meta_rotation","meta_layers","meta_center_x","meta_center_y","meta_pdf_name","datum","zeit","meta_pdf_link",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from (SELECT geo.* FROM stat.view_printlog AS geo) AS foo where geom && GeomFromText('POLYGON((620000 218000,620000 278000,690000 278000,690000 218000,620000 218000))',-1) and ( (lower("datum") = lower('2015-08-31T00:00:00+02:00') ) ) msEvalRegex(): Regular expression error. String failed expression test.</ows:ExceptionText> </ows:Exception>
contains operator:
<ows:ExceptionText>msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. Error (ERROR: operator does not exist: date ~~* text LINE 1: ...690000 218000,620000 218000))',-1) and ( ("datum" ilike '%20... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. ) executing query: select "id","time","name","vorname","adresse_form","plz","ort","email","telefon","zweck","meta_title","meta_comment","meta_layout","meta_scale","meta_rotation","meta_layers","meta_center_x","meta_center_y","meta_pdf_name","datum","zeit","meta_pdf_link",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from (SELECT geo.* FROM stat.view_printlog AS geo) AS foo where geom && GeomFromText('POLYGON((620000 218000,620000 278000,690000 278000,690000 218000,620000 218000))',-1) and ( ("datum" ilike '%2015-08-31T00:00:00+02:00%' escape '!') )</ows:ExceptionText> </ows:Exception>
I think the "contains operator" does not make sense on a date type field and therefore it should not be displayed for the user.
The text was updated successfully, but these errors were encountered: