Added feature to convert various option types to their database
counterpart. This change was brought about by the difficulty of
generating the code using the code generator.