Quantcast

pmapper 4.3(.2) - query editor plugin

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

pmapper 4.3(.2) - query editor plugin

jose mvm
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

pmapper 4.3(.2) - query editor plugin

jose mvm
This post has NOT been accepted by the mailing list yet.
Hi to all!

i'm trying to use the query editor plugin with shape files.

after many attempts, i could observe that:

1) the case (in)sensitive "ILIKE" with the " =* " (or with " ==* ", or with " eq* ") doesn't work for string comparison

2) the wildcard " % " doesn't work

3) the numeric comparison with "not equal" doesn´t work with " <> " (or with " != ") but works with " ne "


i found too a little lapses:

a) within the queryeditor.js file i found this "query = query.replace('%','%25');", witch returned in SendPost source:

"PHPSESSID=dogfa03h4q8do4qgsmbqdqq0q0&operation=query&layername=MA_Contentores&layerType=shape&query=[Material] LIKE '%25eta%'&selectMethode=

when i try to search for [Material] LIKE '%eta%' to return me 'Metal'

b) when i pick the bracket [(] or [)], these buttons doesn´t pass the character into the query box, and when i pick too in the logic operator "NOT" this not appear too in query box

within the queryeditordlg.phtml file i changed:

<input id="queryeditor-OperatorBtnOpenBracket" class="queryeditor-btn queryeditor-btnOperator" type="button"  value="<?php echo (_p("(")) ?>"  onclick="javascript:PM.Plugin.QueryEditor.setOperator(this.id)" />
<input id="queryeditor-OperatorBtnCloseBracket" class="queryeditor-btn queryeditor-btnOperator" type="button"  value="<?php echo (_p(")")) ?>"  onclick="javascript:PM.Plugin.QueryEditor.setOperator(this.id)" />
<input id="queryeditor-OperatorBtnNot" class="queryeditor-btn queryeditor-btnOperator" type="button"  value="<?php echo (_p("NOT")) ?>"  onclick="javascript:PM.Plugin.QueryEditor.setOperator(this.id)" />

replaced by

<input id="queryeditor-operatorBtnOpenBracket" class=" ...
<input id="queryeditor-operatorBtnCloseBracket" class=" ...
<input id="queryeditor-operatorBtnNot" class=" ...

and after it was solved


i tried to compare the searchs between search plugin (with which the case-sensitive and wildcard " * " works fine) and the queryeditor plugin but the methods in use are different (i suppose...)

i haven´t programming skills, i need help

thanks very much Thomas Raffin
thanks to All

José
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pmapper 4.3(.2) - query editor plugin

jose mvm
This post has NOT been accepted by the mailing list yet.
When i search for FREGUESIA = "rr", with the Search Tool plugin (that's work fine), debug file show:

[05-Apr-2014 12:24:04] P.MAPPER debug info
Parameters for searchParams
file: query.php->q_execAttributeQuery
 Array
(
    [layerName] => Cadastro_Rustico
    [layerType] => shape
    [firstFld] => FREGUESIA
    [qStr] => (  "[FREGUESIA]" =~ /(R|r)(R|r)/ )
)

When i search for FREGUESIA = "rr", with the Query Editor plugin, debug file show:

[05-Apr-2014 12:26:29] P.MAPPER debug info
Parameters for REQUEST array
file: query.php->q_execAttributeQuery

 Array
(
    [PHPSESSID] => 1dceb970roddss54lvs10pcr54
    [operation] => query
    [layername] => Cadastro_Rustico
    [layerType] => shape
    [query] => [Freguesia] ILIKE '%rr%'
    [selectMethode] =>
    [externalSearchDefinition] => 1
    [mode] => search
    [layerName] => Cadastro_Rustico
    [firstFld] => FREGUESIA
    [qStr] => (( "[FREGUESIA]" =~ '%rr%'))
)

The string isn't transformed!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pmapper 4.3(.2) - query editor plugin

jose mvm
This post has NOT been accepted by the mailing list yet.
another experience:

Search Tool
search:
   Freguesia RRAIO
   Seccao e*
   Predio *5

[05-Apr-2014 17:01:36] P.MAPPER debug info
Searcharray in search.php->getSearchParameters()
 Array
(
    [PHPSESSID] => d44144iha6r0t00um2jmpq4ui3
    [FREGUESIA] => RRAIO
    [SECCAO] => e*
    [PREDIO] => *5
    [mode] => search
)

[05-Apr-2014 17:01:36] P.MAPPER debug info
Parameters for searchArray

file: query.php->q_execAttributeQuery

 Array
(
    [PHPSESSID] => d44144iha6r0t00um2jmpq4ui3
    [FREGUESIA] => RRAIO
    [SECCAO] => e*
    [PREDIO] => *5
    [mode] => search
)

[05-Apr-2014 17:01:36] P.MAPPER debug info

Parameters for searchParams
file: query.php->q_execAttributeQuery
 Array
(
    [layerName] => Cadastro_Rustico
    [layerType] => shape
    [firstFld] => FREGUESIA
    [qStr] => (((  "[FREGUESIA]" =~ /(R|r)(R|r)(A|a)(I|i)(O|o)/ ) AND "[SECCAO]" =~ /^(E|e)/) AND "[PREDIO]" =~ /(5|5)$/)
)

=============================================================
Query Editor
search (WRITTEN MANUALLY IN MAPSERVER NATIVE LANGUAGE INTO THE GENERATED QUERY BOX/DIALOG BOX QUERY EDITOR PLUGIN):

"[FREGUESIA]" =~ /(R|r)(R|r)(A|a)(I|i)(O|o)/
AND
"[SECCAO]" =~ /^(E|e)/
AND
"[PREDIO]" =~ /(5|5)$/

[05-Apr-2014 17:08:32] P.MAPPER debug info

Parameters for REQUEST array
file: query.php->q_execAttributeQuery

 Array
(
    [PHPSESSID] => d44144iha6r0t00um2jmpq4ui3

    [operation] => query
    [layername] => Cadastro_Rustico
    [layerType] => shape
    [query] => "[FREGUESIA]" =~ /(R|r)(R|r)(A|a)(I|i)(O|o)/
AND
"[SECCAO]" =~ /^(E|e)/
AND
"[PREDIO]" =~ /(5|5)$/

    [selectMethode] =>
    [externalSearchDefinition] => 1
    [mode] => search
    [layerName] => Cadastro_Rustico
    [firstFld] => FREGUESIA
    [qStr] => (("[FREGUESIA]" =~ /(R|r)(R|r)(A|a)(I|i)(O|o)/ AND "[SECCAO]" =~ /^(E|e)/ AND "[PREDIO]" =~ /(5|5)$/))
)
=============================================================

The result is correct and it's the same!
Have no transformation the query with queryeditor plugin.
Loading...