@Test void getSqlDropNotNull() { EntityType entityType = when(mock(EntityType.class).getId()).thenReturn("entity").getMock(); when(entityType.getId()).thenReturn("entityTypeId"); Attribute attr = when(mock(Attribute.class).getName()).thenReturn("attr").getMock(); when(attr.getIdentifier()).thenReturn("attrId"); when(attr.isNillable()).thenReturn(false); assertEquals( "ALTER TABLE \"entityTypeId#c34894ba\" ALTER COLUMN \"attr\" DROP NOT NULL", PostgreSqlQueryGenerator.getSqlDropNotNull(entityType, attr)); }
static String getSqlDropNotNull(EntityType entityType, Attribute attr) { return "ALTER TABLE " + getTableName(entityType) + " ALTER COLUMN " + getColumnName(attr) + " DROP NOT NULL"; }
PostgreSqlQueryGenerator { static String getSqlDropNotNull(EntityType entityType, Attribute attr) { return "ALTER TABLE " + getTableName(entityType) + " ALTER COLUMN " + getColumnName(attr) + " DROP NOT NULL"; } }
PostgreSqlQueryGenerator { static String getSqlDropNotNull(EntityType entityType, Attribute attr) { return "ALTER TABLE " + getTableName(entityType) + " ALTER COLUMN " + getColumnName(attr) + " DROP NOT NULL"; } private  PostgreSqlQueryGenerator(); }
PostgreSqlQueryGenerator { static String getSqlDropNotNull(EntityType entityType, Attribute attr) { return "ALTER TABLE " + getTableName(entityType) + " ALTER COLUMN " + getColumnName(attr) + " DROP NOT NULL"; } private  PostgreSqlQueryGenerator();  }
PostgreSqlQueryGenerator { static String getSqlDropNotNull(EntityType entityType, Attribute attr) { return "ALTER TABLE " + getTableName(entityType) + " ALTER COLUMN " + getColumnName(attr) + " DROP NOT NULL"; } private  PostgreSqlQueryGenerator();   }