public static String generateCode(final SqlType sqlType) {
    return SqlTypeWalker.visit(sqlType, new TypeVisitor());
  }
@Test
  public void shouldGenerateWorkingCodeForAllSqlBaseTypes() {
    for (final SqlBaseType baseType : SqlBaseType.values()) {

      // When:
      final String code = SqlTypeCodeGen.generateCode(TypeInstances.typeInstanceFor(baseType));

      // Then:
      final Object result = CodeGenTestUtil.cookAndEval(code, SqlType.class);
      assertThat(result, is(instanceOf(SqlType.class)));
      assertThat(((SqlType) result).baseType(), is(baseType));
    }
  }