Is there some library or component for generating SQL text using input search conditions?
Something similar to DataSet.Filter property.
for example:
SomeSQLGenerator.ConditionAdd('Name', tEqual, 'John');
Some.SQLGenerator.ConditionAdd('DayOfBith', tLess, '01.01.1980');
String1 := 'SELECT * FROM Users WHERE ' + SomeSQLGenerator.GetText();
so, we should get in String1 something like:
SELECT
*
FROM
Users
WHERE
Name = 'John' AND DayOfBith < '01.01.1980'
Im not lazy, just dont wanna envent a wheel