53 |
53 |
** ECF 20221207 Changed heuristic to extract schema name from full DMO interface name.
|
54 |
54 |
** 003 AL2 20230120 Compute if the underlying DMO requires extra computed columns.
|
55 |
55 |
** 004 AL2 20230317 Extents and date-time extra column are not computed columns; it is safe to exclude them.
|
56 |
|
Avoid lazy initializing hasComputedColumns to avoid concurrency issues.
|
|
56 |
** Avoid lazy initializing hasComputedColumns to avoid concurrency issues.
|
|
57 |
** 005 AL2 20230516 Cache the number of datetime-tz fields.
|
57 |
58 |
*/
|
58 |
59 |
|
59 |
60 |
/*
|
... | ... | |
261 |
262 |
/** The set of properties and their metadata, indexed by their in-memory positions. */
|
262 |
263 |
private Pair<Property, PropertyMeta>[] properties = null;
|
263 |
264 |
|
|
265 |
/** Number of fields of type datetime-tz. This is used to retrieve the number of tz offset columns */
|
|
266 |
private Integer datetimeTzCount = null;
|
|
267 |
|
264 |
268 |
/** The unique id of this DMO. */
|
265 |
269 |
private final int id = idSeed.incrementAndGet();
|
266 |
270 |
|
... | ... | |
1601 |
1605 |
return Category.VST.name().equals(category) && systemTable.fileName.equalsIgnoreCase(legacyTable);
|
1602 |
1606 |
}
|
1603 |
1607 |
|
|
1608 |
/**
|
|
1609 |
* Retrieve the number of fields of type datetime-tz. This should be used to detect how many
|
|
1610 |
* additional tz offset columns are generated.
|
|
1611 |
*
|
|
1612 |
* @return The number of datetime-tz fields.
|
|
1613 |
*/
|
|
1614 |
public int getDatetimeTzCount()
|
|
1615 |
{
|
|
1616 |
if (datetimeTzCount == null)
|
|
1617 |
{
|
|
1618 |
int counter = 0;
|
|
1619 |
Set<Map.Entry<String, Property>> fieldEntries = propsByName.entrySet();
|
|
1620 |
for (Map.Entry<String, Property> field : fieldEntries)
|
|
1621 |
{
|
|
1622 |
if (field.getValue()._isDatetimeTz)
|
|
1623 |
{
|
|
1624 |
counter++; // datetimetz use two columns per property
|
|
1625 |
}
|
|
1626 |
}
|
|
1627 |
datetimeTzCount = counter;
|
|
1628 |
}
|
|
1629 |
return datetimeTzCount;
|
|
1630 |
}
|
|
1631 |
|
|
1632 |
|
1604 |
1633 |
|
1605 |
1634 |
/**
|
1606 |
1635 |
* Check if this DMO has computed columns in the underlying database representation. This is
|