I had seen somewhere the builder pattern used to create DML SQL statements. I was wondering, which pattern(s) would be (more) appropriate for building SQL DDL statements.
I am thinking about simple program (DB tool, solely for self-education purposes), that would create (dynamically) simple SQL DDL statements. I am not sure which patterns should I consider.
The factory pattern allows me to decouple client code from concrete database provider classes library. I suppose it's a clear choice here (please correct me if I am wrong). The decorator pattern was my first choice for building sql statements, but after coding some examples and then reading this answer I am almost sure, I shouldn't be using decorator, as I am building objects and not decorating already created objects.
So.. which patterns should I consider and why are they good/better in this case?
Updated for clarification.