Hi, I still think about the implementation of a SQL LIKE/ESCAPE fix. The problem is that the function select was not designed to support operators. There is only an hash object called DYNAMIC. This object matches column names (hash key) to values (hash value). If the column is numeric then we use equal otherwise we use like.
DYNAMIC is used approximately 71 times in our code. So it is possible
to change the interface. There are two options from my point of view:
1. Extend the DYNAMIC hash
We need a key, a value and an operator. The problem with flexibility
is that it is difficult to imagine all the security implications.
Old style:
DYNAMIC->{"NAME"} = "Michael Bell"
New style:
DYNAMIC->{"NAME"}->{"VALUE"} = "Michael Bell"
DYNAMIC->{"NAME"}->{"OPERATOR"} = "EQUAL";
The question is, which operators do we need?
We could also use a structure like this:
DYNAMIC->{EQUAL}->{"NAME"} = "Michael Bell"
DYNAMIC->{LIKE}->{"NAME"} = "%Bell%"
The second proposal looks perhaps nicer but the functionality is
exactly the same. It is only another flavour.
2. Quick and dirty
DYNAMIC only supports equal. DYNAMIC_LIKE only supports like. That's
it. No more additional operators. Very easy to implement.
My personal favourite is the first option and the second proposed
structure.
What do you think? Any comments please?
Best regards
Michael
--
___________________________________________________________________
Michael Bell Humboldt-Universitaet zu Berlin
Tel.: +49 (0)30-2093 70143 ZE Computer- und Medienservice
Fax: +49 (0)30-2093 70135 Unter den Linden 6
[email protected] D-10099 Berlin
___________________________________________________________________
PGP Fingerprint: 09E4 3D29 4156 2774 0F2C C643 D8BD 1918 2030 5AAB
smime.p7s
Description: S/MIME Kryptografische Unterschrift
------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________ OpenXPKI-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openxpki-devel
