On 9/1/17 8:45pm, Nikita Timofeev wrote:
>> Could that syntax above could be cleaner like:
>>
>>    Property<Integer> nameLength = 
>> Artist.ARTIST_NAME.function(Expression.SQL_LENGTH)
>>
>> or is that just going to result in a whole lot of clutter in the class?
>>
> Such methods will create too much coupling between properties and
> functions, I'm afraid,
> as Property class would know about all SQL functions and their arguments.


I'm not convinced that all the SQL specific code would land in the Property 
class. That would be a wrapper to the factory methods elsewhere.

I'm not sure the enum approach above is the cleanest, but some shorter simpler 
API which still gives us the correct Property<Integer> generics would be nice.


Ari




-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Reply via email to