NoelToy / automatic-relationship-finder

A Java library for automatic relationship detection between database tables based on column name and data matching. Ideal for OLTP data where physical relationships may be absent at the RDBMS level. Users can configure column name and data match confidence thresholds to fine-tune results.
Apache License 2.0
15 stars 1 forks source link

Boolean Type detection ... #3

Open tsegall opened 2 days ago

tsegall commented 2 days ago

The code would be more robust if instead of the current code in isTypeBoolean you simply did the following: return FTAType.BOOLEAN.equals(result.getType())

If you really wanted to preserve the current functionality (i.e. ignoring fields that are Booleans represented as 0/1) then you could use the following: return FTAType.BOOLEAN.equals(result.getType()) && Arrays.asList(new String[] { "YES_NO", "Y_N", "TRUE_FALSE" }).contains(result.getTypeModifier());

Making the above change enables you to work in any language not just English.

NoelToy commented 2 days ago

@tsegall Thanks for the input. I will include this change in upcoming release.