Jody Garnett wrote:
Chris Holmes wrote:
I would find it much more clear to make a class that does this in one pass; that is accepts a filter and outputs both an SQL statement and the leftover filter that could not be encoded. That way we do not split up decision making between two classes.
No, the reason we don't do that is because the encodings can be different, indeed SQL is a misnomer.
Not sure I followed you ... I am talking about the SQLEncoder taking on the job of splitting as well.
I'm saying that we also have a WFS encoder, and WFS is not SQL, so the name SQLUnpacker is a misnomer, since it just generically splits things, to be used in sql or not.


There are classes that 'do this in one pass', that make use of SQLEncoder. But we don't combine splitting and encoding since different classes do their encoding differently. I suppose you could theoretically have the splitting in a super class that all inherit from, but in my opinion it makes far more sense to have one class do it and reuse that class.
Different classes still do their encoding differently, they are also taking responsibility for building up the filter of things they could not encode.

Both solutions make sense; I just have a hard time debugging what went wrong with the current split then encode approach.
Interesting, I've never had a hard time debugging it because splitting is so simple and debugged that it always works. Except for when they switched to the 'new' one and it didn't work.

Chris



Cheers,
Jody

!DSPAM:1003,45f09aa7188531194215290!


--
Chris Holmes
The Open Planning Project
http://topp.openplans.org
begin:vcard
fn:Chris Holmes
n:Holmes;Chris
org:The Open Planning Project
adr:;;349 W. 12th Street, #3;New York;NY;10014;USA
email;internet:[EMAIL PROTECTED]
title:Managing Director, Strategic Development
x-mozilla-html:FALSE
url:http://topp.openplans.org
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to