design pattern for sql builder
I want to write sql builder 开发者_StackOverflow中文版( in: conditions(where, limits, table, etc), out: pure sql. ). Which design pattern nearest for this task?
Some kind of expression tree along with a visitor or maybe some kind of interpreter.
http://en.wikipedia.org/wiki/Visitor_pattern
http://en.wikipedia.org/wiki/Interpreter_pattern
精彩评论