use of org.dbflute.logic.jdbc.metadata.supplement.DfDatetimePrecisionExtractor in project dbflute-core by dbflute.
the class DfSchemaXmlSerializer method doHelpTableDatePrecision.
protected void doHelpTableDatePrecision(List<DfTableMeta> tableList, UnifiedSchema unifiedSchema) {
final DfDatetimePrecisionExtractor datetimePrecisionExtractor = createDatetimePrecisionExtractor(unifiedSchema);
if (datetimePrecisionExtractor != null) {
final Set<String> tableSet = new HashSet<String>();
for (DfTableMeta table : tableList) {
tableSet.add(table.getTableName());
}
try {
if (_datetimePrecisionAllMap == null) {
_datetimePrecisionAllMap = new LinkedHashMap<UnifiedSchema, Map<String, Map<String, Integer>>>();
}
final Map<String, Map<String, Integer>> datetimePrecisionMap = _datetimePrecisionAllMap.get(unifiedSchema);
final Map<String, Map<String, Integer>> extractedMap = datetimePrecisionExtractor.extractDatetimePrecisionMap(tableSet);
if (datetimePrecisionMap == null) {
_datetimePrecisionAllMap.put(unifiedSchema, extractedMap);
} else {
// basically no way, schema is unique but just in case
// merge
datetimePrecisionMap.putAll(extractedMap);
}
} catch (RuntimeException continued) {
_log.info("Failed to extract date-time precisions: extractor=" + datetimePrecisionExtractor, continued);
}
}
}
Aggregations