stazz / java-sql-generator

A framework to generate syntactically correct SQL statements in a typesafe, easy, and uniform way (without StringBuilders).
49 stars 28 forks source link

Convert all enums to String for better extensibility. #3

Closed stazz closed 13 years ago

stazz commented 13 years ago

Some things may seem really non-extensible in SQL 99 BNF document, yet some RDB vendors provide extensions to them. Currently, some things are defiend using enum keyword. Make all enum values into strings so that they may be extended more easily.

stazz commented 13 years ago

Actually, I'm going to make them interfaces, and each member is a public static final anonymous inner class implementing that interface. That way it is type-safe AND extendable.

stazz commented 13 years ago

Final classes were even better than interfaces, since each member doesn't create own type. Turned all enums to final classes now.