using built-in db scalar functions in predicate expressions

Posts   
 
    
tolga
User
Posts: 25
Joined: 26-Feb-2006
# Posted on: 25-Sep-2007 05:02:16   

Hi,

is there a way to use a built-in scalar function like trim() or len()? For example, sometimes you want to retrieve all rows where a trimmed column is compared to certain value ranges...

As an extension to this question, is there a way to create special reusable expression classes that encapsulate such functionality (so that next time you use the same expression you can use the predicate expression class you've already built)?

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 25-Sep-2007 10:29:13   

is there a way to use a built-in scalar function like trim() or len()?

trinm() and len() are database functions. Please refer to the LLBLGen Pro manual's section "Using the generated code -> Calling a database function"

As an extension to this question, is there a way to create special reusable expression classes that encapsulate such functionality (so that next time you use the same expression you can use the predicate expression class you've already built)?

You can inherit from LLBLGen Pro Predicate classes like "FieldCompareValuePredicate", and build your own Predicate class.