Base class for SQL statements

Unit tested code