On Thu, 7 Apr 2016, Luiz Americo Pereira Camara wrote:

I enconter the following pattern frequently (simplified):

SQL:
Select * From Customers Where FieldX = 1

Later i need a similar query that uses a different filter like

Select * From Customers Where FieldX = 1 and FieldY = :paramy

Is there any code that given a SQL Template would generate the second
filter when paramy is available and keep blank when not available?

Like
Select * From Customers Where FieldX = 1 ${paramtemplate paramy}

The param not necessarily have to be in TParams, in my case the param is
both in a JSON object and in TParams

I have not found such code. I rolled my own.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to