String tableName = desc.getTableName();
String getTableNameForDocumentKind(String documentKind) { TableDescription td; if ((td = this.tableDescPerDocumentKind.get(documentKind)) != null) { return td.getTableName(); } return null; }
String getTableNameForFactoryLink(String factoryLink) { TableDescription td; if ((td = this.tableDescPerFactoryLink.get(factoryLink)) != null) { return td.getTableName(); } return null; }
td.getTableName(), where); } else { sql = String.format("SELECT %s FROM %s WHERE %s %s LIMIT %s", fields, td.getTableName(), where, orderBy, hitCount); if (offset > 0) { sql += String.format(" OFFSET %d", offset); fields, td.getTableName(), where); }) .filter(Objects::nonNull)
fields, tables.iterator().next().getTableName(), where, groupBy, orderBy, groupLimit + 1); if (groupOffset > 0) { fields, td.getTableName(), where); }) .filter(Objects::nonNull)
td.getTableName(), where); }) .filter(Objects::nonNull) td.getTableName(), where);
tableDescription.getTableName());
private int applyDocumentExpirationPolicyForTable(TableDescription tableDescription, long now, long deadline, int limit) throws Exception { int expired = 0; String tableName = tableDescription.getTableName(); String sql = String.format("SELECT data,documentexpirationtimemicros FROM %s WHERE documentexpirationtimemicros BETWEEN 1 AND ? ORDER BY documentexpirationtimemicros LIMIT ?", tableName);
private String addTable(TableDescription td) { JsonObject table = new JsonObject(); table.addProperty("name", td.getTableName()); String tableId = addSnapshotId(table, LIQUIBASE_STRUCTURE_CORE_TABLE, td.getTableName()); String primaryKeyIndexName = td.getTableName() + "_pkey";
private void addIndex(TableDescription td, String tableId, ColumnDescription columnDescription, String indexNameSuffix, Map<String, String> indexIds, List<String> columnIds) { // Postgres names are maxed at 63 bytes, as long as we use ascii we should have no more than // 63 characters String indexName = toHashedName( td.getTableName() + "_idx_" + indexNameSuffix, 63); String indexId = addIndex(tableId, indexName, false, columnIds); indexIds.put(indexName, indexId); this.columnDescriptionPerIndexId.put(indexName, columnDescription); }