[GRASS5] [bug #4056] (grass) db.test fails on sqlite driver

Glynn Clements wrote:

  SQLite understands the following binary operators, in order from
  highest to lowest precedence:
  
      ||
      * / %
      + -
      << >> & |
      < <= > >=
      = == != <> IN
      AND
      OR

~ 'string' is the same as LIKE '%string%' in SQL.

And on http://www.sqlite.org/lang_expr.html LIKE is mentioned among 'like-op
::', not among binary operators. So ~ "aka" LIKE is not a binary operator it
seems, and it is supported by SQLITE, as LIKE '%string%'.

But, to confussion, Grass's DBF driver doesn't understand LIKE, only ~. On the
other hand, ogr2ogr DBF driver accepts only LIKE (eg. querries on shapefiles),
while it doesn't accept ~ ...

So maybe to standarise things, all database backends in Grass should be
changed to understand LIKE, leaving DBF understanding ~ for legacy?

And db.test then could skip testing for ~, and do the LIKE test instead for
all backends?

My 0,01 yen.

Maciek

-------------------------------------------- Managed by Request Tracker