@Test public void testGetColumnType_tinyint() throws Exception { ColumnType type = dialect .getColumnType("tinyint identity", Types.OTHER); assertEquals("tinyint", type.getColumnDefinition(0, 0, 0, null)); assertEquals(Short.class, type.getAttributeClass(0, 0, 0)); }
@Override public ColumnType getColumnType(String typeName, int sqlType) { ColumnType columnType = columnTypeMap.get(typeName); if (columnType != null) { return columnType; } if (StringUtil.startsWithIgnoreCase(typeName, "int")) { typeName = "int"; } else if (StringUtil.startsWithIgnoreCase(typeName, "bigint")) { typeName = "bigint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "smallint")) { typeName = "smallint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "tinyint")) { typeName = "tinyint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "decimal")) { typeName = "decimal"; } else if (StringUtil.startsWithIgnoreCase(typeName, "numeric")) { typeName = "numeric"; } return super.getColumnType(typeName, sqlType); }
MssqlGenDialect extends StandardGenDialect { @Override public ColumnType getColumnType(String typeName, int sqlType) { ColumnType columnType = columnTypeMap.get(typeName); if (columnType != null) { return columnType; } if (StringUtil.startsWithIgnoreCase(typeName, "int")) { typeName = "int"; } else if (StringUtil.startsWithIgnoreCase(typeName, "bigint")) { typeName = "bigint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "smallint")) { typeName = "smallint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "tinyint")) { typeName = "tinyint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "decimal")) { typeName = "decimal"; } else if (StringUtil.startsWithIgnoreCase(typeName, "numeric")) { typeName = "numeric"; } return super.getColumnType(typeName, sqlType); } }
MssqlGenDialect extends StandardGenDialect { @Override public ColumnType getColumnType(String typeName, int sqlType) { ColumnType columnType = columnTypeMap.get(typeName); if (columnType != null) { return columnType; } if (StringUtil.startsWithIgnoreCase(typeName, "int")) { typeName = "int"; } else if (StringUtil.startsWithIgnoreCase(typeName, "bigint")) { typeName = "bigint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "smallint")) { typeName = "smallint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "tinyint")) { typeName = "tinyint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "decimal")) { typeName = "decimal"; } else if (StringUtil.startsWithIgnoreCase(typeName, "numeric")) { typeName = "numeric"; } return super.getColumnType(typeName, sqlType); } MssqlGenDialect(); }
MssqlGenDialect extends StandardGenDialect { @Override public ColumnType getColumnType(String typeName, int sqlType) { ColumnType columnType = columnTypeMap.get(typeName); if (columnType != null) { return columnType; } if (StringUtil.startsWithIgnoreCase(typeName, "int")) { typeName = "int"; } else if (StringUtil.startsWithIgnoreCase(typeName, "bigint")) { typeName = "bigint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "smallint")) { typeName = "smallint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "tinyint")) { typeName = "tinyint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "decimal")) { typeName = "decimal"; } else if (StringUtil.startsWithIgnoreCase(typeName, "numeric")) { typeName = "numeric"; } return super.getColumnType(typeName, sqlType); } MssqlGenDialect(); @Override String getName(); @Override String getDefaultSchemaName(String userName); @Override GenerationType getDefaultGenerationType(); @Override String getOpenQuote(); @Override String getCloseQuote(); @Override String getSqlBlockDelimiter(); @Override String getIdentityColumnDefinition(); @Override boolean isTableNotFound(Throwable throwable); @Override boolean isColumnNotFound(Throwable throwable); @Override ColumnType getColumnType(String typeName, int sqlType); @Override SqlBlockContext createSqlBlockContext(); @Override boolean supportsIdentityInsert(); @Override boolean supportsIdentityInsertControlStatement(); @Override String getIdentityInsertEnableStatement(String tableName); @Override String getIdentityInsertDisableStatement(String tableName); @Override boolean supportsIdentity(); }
MssqlGenDialect extends StandardGenDialect { @Override public ColumnType getColumnType(String typeName, int sqlType) { ColumnType columnType = columnTypeMap.get(typeName); if (columnType != null) { return columnType; } if (StringUtil.startsWithIgnoreCase(typeName, "int")) { typeName = "int"; } else if (StringUtil.startsWithIgnoreCase(typeName, "bigint")) { typeName = "bigint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "smallint")) { typeName = "smallint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "tinyint")) { typeName = "tinyint"; } else if (StringUtil.startsWithIgnoreCase(typeName, "decimal")) { typeName = "decimal"; } else if (StringUtil.startsWithIgnoreCase(typeName, "numeric")) { typeName = "numeric"; } return super.getColumnType(typeName, sqlType); } MssqlGenDialect(); @Override String getName(); @Override String getDefaultSchemaName(String userName); @Override GenerationType getDefaultGenerationType(); @Override String getOpenQuote(); @Override String getCloseQuote(); @Override String getSqlBlockDelimiter(); @Override String getIdentityColumnDefinition(); @Override boolean isTableNotFound(Throwable throwable); @Override boolean isColumnNotFound(Throwable throwable); @Override ColumnType getColumnType(String typeName, int sqlType); @Override SqlBlockContext createSqlBlockContext(); @Override boolean supportsIdentityInsert(); @Override boolean supportsIdentityInsertControlStatement(); @Override String getIdentityInsertEnableStatement(String tableName); @Override String getIdentityInsertDisableStatement(String tableName); @Override boolean supportsIdentity();  }