From 1616d52fecc1db0e7bb9673d43323fcd449be4c3 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Wed, 4 Oct 2023 23:41:25 +0300 Subject: [PATCH] Simplify admin statistics Remove old report endpoints from security config --- .../AdminStatisticsJobRequestHandler.java | 34 ++- .../eclipse/openvsx/entities/Download.java | 61 ----- .../AdminStatisticCalculationsRepository.java | 203 ++++---------- .../repositories/RepositoryService.java | 48 ++-- .../openvsx/security/SecurityConfig.java | 4 +- .../storage/AzureDownloadCountProcessor.java | 22 +- .../storage/AzureDownloadCountService.java | 8 +- .../openvsx/storage/StorageUtilService.java | 8 - .../eclipse/openvsx/jooq/DefaultCatalog.java | 14 +- .../org/eclipse/openvsx/jooq/Indexes.java | 6 +- .../org/eclipse/openvsx/jooq/Keys.java | 11 +- .../org/eclipse/openvsx/jooq/Public.java | 52 ++-- .../org/eclipse/openvsx/jooq/Sequences.java | 62 ++++- .../org/eclipse/openvsx/jooq/Tables.java | 24 +- .../openvsx/jooq/tables/AdminStatistics.java | 44 ++- .../AdminStatisticsExtensionsByRating.java | 61 ++++- ...isticsPublishersByExtensionsPublished.java | 64 ++++- ...tatisticsTopMostActivePublishingUsers.java | 64 ++++- ...StatisticsTopMostDownloadedExtensions.java | 64 ++++- ...atisticsTopNamespaceExtensionVersions.java | 64 ++++- ...AdminStatisticsTopNamespaceExtensions.java | 63 ++++- .../AzureDownloadCountProcessedItem.java | 62 ++++- .../eclipse/openvsx/jooq/tables/Download.java | 159 ----------- .../jooq/tables/EntityActiveState.java | 157 ----------- .../openvsx/jooq/tables/Extension.java | 45 ++- .../openvsx/jooq/tables/ExtensionReview.java | 49 +++- .../openvsx/jooq/tables/ExtensionVersion.java | 37 ++- .../openvsx/jooq/tables/FileResource.java | 47 +++- .../jooq/tables/FlywaySchemaHistory.java | 49 +++- .../tables/JobrunrBackgroundjobservers.java | 102 +++++-- .../openvsx/jooq/tables/JobrunrJobs.java | 41 ++- .../openvsx/jooq/tables/JobrunrJobsStats.java | 91 ++++++- .../openvsx/jooq/tables/JobrunrMetadata.java | 41 ++- .../jooq/tables/JobrunrMigrations.java | 41 ++- .../jooq/tables/JobrunrRecurringJobs.java | 63 ++++- .../openvsx/jooq/tables/MigrationItem.java | 41 ++- .../openvsx/jooq/tables/Namespace.java | 38 ++- .../jooq/tables/NamespaceMembership.java | 54 +++- .../jooq/tables/NamespaceSocialLinks.java | 45 ++- .../openvsx/jooq/tables/PersistedLog.java | 46 +++- .../jooq/tables/PersonalAccessToken.java | 49 +++- .../eclipse/openvsx/jooq/tables/Shedlock.java | 41 ++- .../openvsx/jooq/tables/SignatureKeyPair.java | 38 ++- .../openvsx/jooq/tables/SpringSession.java | 41 ++- .../jooq/tables/SpringSessionAttributes.java | 54 +++- .../eclipse/openvsx/jooq/tables/UserData.java | 38 ++- ...minStatisticsExtensionsByRatingRecord.java | 19 +- ...PublishersByExtensionsPublishedRecord.java | 22 +- .../tables/records/AdminStatisticsRecord.java | 7 +- ...icsTopMostActivePublishingUsersRecord.java | 22 +- ...ticsTopMostDownloadedExtensionsRecord.java | 22 +- ...csTopNamespaceExtensionVersionsRecord.java | 22 +- ...tatisticsTopNamespaceExtensionsRecord.java | 22 +- ...AzureDownloadCountProcessedItemRecord.java | 19 +- .../jooq/tables/records/DownloadRecord.java | 219 --------------- .../records/EntityActiveStateRecord.java | 256 ------------------ .../jooq/tables/records/ExtensionRecord.java | 1 + .../tables/records/ExtensionReviewRecord.java | 1 + .../records/ExtensionVersionRecord.java | 7 +- .../tables/records/FileResourceRecord.java | 1 + .../records/FlywaySchemaHistoryRecord.java | 1 + .../JobrunrBackgroundjobserversRecord.java | 136 +++++++--- .../tables/records/JobrunrJobsRecord.java | 1 + .../records/JobrunrJobsStatsRecord.java | 170 +++++------- .../tables/records/JobrunrMetadataRecord.java | 1 + .../records/JobrunrMigrationsRecord.java | 1 + .../records/JobrunrRecurringJobsRecord.java | 58 +++- .../tables/records/MigrationItemRecord.java | 1 + .../records/NamespaceMembershipRecord.java | 1 + .../jooq/tables/records/NamespaceRecord.java | 1 + .../records/NamespaceSocialLinksRecord.java | 1 + .../tables/records/PersistedLogRecord.java | 1 + .../records/PersonalAccessTokenRecord.java | 1 + .../jooq/tables/records/ShedlockRecord.java | 1 + .../records/SignatureKeyPairRecord.java | 1 + .../SpringSessionAttributesRecord.java | 7 +- .../tables/records/SpringSessionRecord.java | 1 + .../jooq/tables/records/UserDataRecord.java | 1 + .../migration/V1_42__Simplify_Admin_Stats.sql | 16 ++ .../RepositoryServiceSmokeTest.java | 23 +- 80 files changed, 1904 insertions(+), 1610 deletions(-) delete mode 100644 server/src/main/java/org/eclipse/openvsx/entities/Download.java delete mode 100644 server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Download.java delete mode 100644 server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/EntityActiveState.java delete mode 100644 server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/DownloadRecord.java delete mode 100644 server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/EntityActiveStateRecord.java create mode 100644 server/src/main/resources/db/migration/V1_42__Simplify_Admin_Stats.sql diff --git a/server/src/main/java/org/eclipse/openvsx/admin/AdminStatisticsJobRequestHandler.java b/server/src/main/java/org/eclipse/openvsx/admin/AdminStatisticsJobRequestHandler.java index 7cb8711b9..b4c5bbbf6 100644 --- a/server/src/main/java/org/eclipse/openvsx/admin/AdminStatisticsJobRequestHandler.java +++ b/server/src/main/java/org/eclipse/openvsx/admin/AdminStatisticsJobRequestHandler.java @@ -35,70 +35,68 @@ public class AdminStatisticsJobRequestHandler implements JobRequestHandler> ADMIN REPORT STATS {} {}", year, month); var stopwatch = new StopWatch(); stopwatch.start("repositories.countActiveExtensions"); - var extensions = repositories.countActiveExtensions(endExclusive); - stopwatch.stop(); - LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); - - stopwatch.start("repositories.downloadsBetween"); - var downloads = repositories.downloadsBetween(startInclusive, endExclusive); + var extensions = repositories.countActiveExtensions(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.downloadsUntil"); - var downloadsTotal = repositories.downloadsUntil(endExclusive); + var downloadsTotal = repositories.downloadsTotal(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); + var lastDate = LocalDateTime.of(year, month, 1, 0, 0).minusMonths(1); + var lastAdminStatistics = repositories.findAdminStatisticsByYearAndMonth(lastDate.getYear(), lastDate.getMonthValue()); + var lastDownloadsTotal = lastAdminStatistics != null ? lastAdminStatistics.getDownloadsTotal() : 0; + var downloads = downloadsTotal - lastDownloadsTotal; + stopwatch.start("repositories.countActiveExtensionPublishers"); - var publishers = repositories.countActiveExtensionPublishers(endExclusive); + var publishers = repositories.countActiveExtensionPublishers(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.averageNumberOfActiveReviewsPerActiveExtension"); - var averageReviewsPerExtension = repositories.averageNumberOfActiveReviewsPerActiveExtension(endExclusive); + var averageReviewsPerExtension = repositories.averageNumberOfActiveReviewsPerActiveExtension(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.countPublishersThatClaimedNamespaceOwnership"); - var namespaceOwners = repositories.countPublishersThatClaimedNamespaceOwnership(endExclusive); + var namespaceOwners = repositories.countPublishersThatClaimedNamespaceOwnership(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.countActiveExtensionsGroupedByExtensionReviewRating"); - var extensionsByRating = repositories.countActiveExtensionsGroupedByExtensionReviewRating(endExclusive); + var extensionsByRating = repositories.countActiveExtensionsGroupedByExtensionReviewRating(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.countActiveExtensionPublishersGroupedByExtensionsPublished"); - var publishersByExtensionsPublished = repositories.countActiveExtensionPublishersGroupedByExtensionsPublished(endExclusive); + var publishersByExtensionsPublished = repositories.countActiveExtensionPublishersGroupedByExtensionsPublished(); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); var limit = 10; stopwatch.start("repositories.topMostActivePublishingUsers"); - var topMostActivePublishingUsers = repositories.topMostActivePublishingUsers(endExclusive, limit); + var topMostActivePublishingUsers = repositories.topMostActivePublishingUsers(limit); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.topNamespaceExtensions"); - var topNamespaceExtensions = repositories.topNamespaceExtensions(endExclusive, limit); + var topNamespaceExtensions = repositories.topNamespaceExtensions(limit); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.topNamespaceExtensionVersions"); - var topNamespaceExtensionVersions = repositories.topNamespaceExtensionVersions(endExclusive, limit); + var topNamespaceExtensionVersions = repositories.topNamespaceExtensionVersions(limit); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); stopwatch.start("repositories.topMostDownloadedExtensions"); - var topMostDownloadedExtensions = repositories.topMostDownloadedExtensions(endExclusive, limit); + var topMostDownloadedExtensions = repositories.topMostDownloadedExtensions(limit); stopwatch.stop(); LOGGER.info("{} took {} ms", stopwatch.getLastTaskName(), stopwatch.getLastTaskTimeMillis()); LOGGER.info("<< ADMIN REPORT STATS {} {}", year, month); diff --git a/server/src/main/java/org/eclipse/openvsx/entities/Download.java b/server/src/main/java/org/eclipse/openvsx/entities/Download.java deleted file mode 100644 index 8c470e687..000000000 --- a/server/src/main/java/org/eclipse/openvsx/entities/Download.java +++ /dev/null @@ -1,61 +0,0 @@ -/** ****************************************************************************** - * Copyright (c) 2021 Precies. Software and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * SPDX-License-Identifier: EPL-2.0 - * ****************************************************************************** */ -package org.eclipse.openvsx.entities; - -import jakarta.persistence.*; -import java.time.LocalDateTime; - -@Entity -public class Download { - - @Id - @GeneratedValue(generator = "downloadSeq") - @SequenceGenerator(name = "downloadSeq", sequenceName = "download_seq") - long id; - - @Column(name = "file_resource_id_not_fk") - long fileResourceId; - - LocalDateTime timestamp; - - int amount; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public long getFileResourceId() { - return fileResourceId; - } - - public void setFileResourceId(long fileResourceId) { - this.fileResourceId = fileResourceId; - } - - public LocalDateTime getTimestamp() { - return timestamp; - } - - public void setTimestamp(LocalDateTime timestamp) { - this.timestamp = timestamp; - } - - public int getAmount() { - return amount; - } - - public void setAmount(int amount) { - this.amount = amount; - } -} diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticCalculationsRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticCalculationsRepository.java index 66fa1653b..da377f747 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticCalculationsRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticCalculationsRepository.java @@ -10,13 +10,12 @@ package org.eclipse.openvsx.repositories; import org.eclipse.openvsx.entities.NamespaceMembership; -import org.jooq.*; +import org.jooq.DSLContext; import org.jooq.impl.DSL; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; -import java.time.LocalDateTime; import java.util.AbstractMap; import java.util.Map; import java.util.stream.Collectors; @@ -25,87 +24,49 @@ @Component public class AdminStatisticCalculationsRepository { - - private static final String ALIAS_LAST_CHANGE = "last_change"; - private static final String ENTITY_TYPE_EXTENSION = "extension"; - private static final String ENTITY_TYPE_EXTENSION_REVIEW = "extension_review"; - private static final String ENTITY_TYPE_EXTENSION_VERSION = "extension_version"; - @Autowired DSLContext dsl; - public long downloadsSumByTimestampLessThan(LocalDateTime endExclusive) { - return downloadsSum(null, endExclusive); - } - - public long downloadsSumByTimestampGreaterThanEqualAndTimestampLessThan(LocalDateTime startInclusive, LocalDateTime endExclusive) { - return downloadsSum(startInclusive, endExclusive); - } - - private long downloadsSum(LocalDateTime startInclusive, LocalDateTime endExclusive) { - var sum = DSL.coalesce(DSL.sum(DOWNLOAD.AMOUNT),new BigDecimal(0)); - var startClause = startInclusive != null ? DOWNLOAD.TIMESTAMP.greaterOrEqual(startInclusive) : null; - var endClause = DOWNLOAD.TIMESTAMP.lessThan(endExclusive); - var query = dsl.select(sum) - .from(DOWNLOAD) - .where(endClause); - - if(startClause != null) { - query = query.and(startClause); - } - - return query.fetchOne(sum).longValue(); + public long downloadsTotal() { + var sum = DSL.coalesce(DSL.sum(EXTENSION.DOWNLOAD_COUNT),new BigDecimal(0)); + return dsl.select(sum) + .from(EXTENSION) + .where(EXTENSION.ACTIVE.eq(true)) + .fetchOne(sum) + .longValue(); } - public int countActiveExtensions(LocalDateTime endExclusive) { - var count = DSL.count(ENTITY_ACTIVE_STATE.ENTITY_ID); - var lastChangedEntityStates = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("m"); + public int countActiveExtensions() { + var count = DSL.count(EXTENSION.ID); return dsl.select(count) - .from(ENTITY_ACTIVE_STATE) - .join(lastChangedEntityStates) - .on(lastChangedEntityStates.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(ENTITY_ACTIVE_STATE.ENTITY_ID).and(lastChangedEntityStates.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(ENTITY_ACTIVE_STATE.TIMESTAMP))) - .where(ENTITY_ACTIVE_STATE.ACTIVE.eq(true)).fetchOne(count); + .from(EXTENSION) + .where(EXTENSION.ACTIVE.eq(true)) + .fetchOne(count); } - public int countActiveExtensionPublishers(LocalDateTime endExclusive) { - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionVersionState = ENTITY_ACTIVE_STATE.as("evs"); - var lastChangedExtensionVersionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_VERSION).asTable("aev"); + public int countActiveExtensionPublishers() { var publishers = DSL.countDistinct(PERSONAL_ACCESS_TOKEN.USER_DATA); return dsl.select(publishers) .from(EXTENSION) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionVersionState).on(extensionVersionState.ENTITY_ID.eq(EXTENSION_VERSION.ID).and(extensionVersionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_VERSION))) - .join(lastChangedExtensionVersionState).on(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionVersionState.ENTITY_ID).and(lastChangedExtensionVersionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionVersionState.TIMESTAMP))) + .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(EXTENSION.ID)) .join(PERSONAL_ACCESS_TOKEN).on(PERSONAL_ACCESS_TOKEN.ID.eq(EXTENSION_VERSION.PUBLISHED_WITH_ID)) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionVersionState.ACTIVE.eq(true)) + .where(EXTENSION.ACTIVE.eq(true)) + .and(EXTENSION_VERSION.ACTIVE.eq(true)) .fetchOne(publishers); } - public Map countActiveExtensionPublishersGroupedByExtensionsPublished(LocalDateTime endExclusive) { + public Map countActiveExtensionPublishersGroupedByExtensionsPublished() { var aliasPublisher = "publisher"; var aliasExtensionCount = "extension_count"; - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionVersionState = ENTITY_ACTIVE_STATE.as("evs"); - var lastChangedExtensionVersionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_VERSION).asTable("aev"); var extensionCountsByPublisher = dsl.select( PERSONAL_ACCESS_TOKEN.USER_DATA.as(aliasPublisher), DSL.countDistinct(EXTENSION.ID).as(aliasExtensionCount) ) .from(EXTENSION) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionVersionState).on(extensionVersionState.ENTITY_ID.eq(EXTENSION_VERSION.ID).and(extensionVersionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_VERSION))) - .join(lastChangedExtensionVersionState).on(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionVersionState.ENTITY_ID).and(lastChangedExtensionVersionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionVersionState.TIMESTAMP))) + .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(EXTENSION.ID)) .join(PERSONAL_ACCESS_TOKEN).on(PERSONAL_ACCESS_TOKEN.ID.eq(EXTENSION_VERSION.PUBLISHED_WITH_ID)) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionVersionState.ACTIVE.eq(true)) + .where(EXTENSION.ACTIVE.eq(true)) + .and(EXTENSION_VERSION.ACTIVE.eq(true)) .groupBy(PERSONAL_ACCESS_TOKEN.USER_DATA) .asTable("aep"); @@ -121,26 +82,18 @@ public Map countActiveExtensionPublishersGroupedByExtensionsPu .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - public Map countActiveExtensionsGroupedByExtensionReviewRating(LocalDateTime endExclusive) { + public Map countActiveExtensionsGroupedByExtensionReviewRating() { var aliasExtensionId = "extension_id"; var aliasAverageRating = "average_rating"; - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionReviewState = ENTITY_ACTIVE_STATE.as("ers"); - var lastChangedExtensionReviewState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_REVIEW).asTable("aer"); var averageRatingByExtension = dsl.select( EXTENSION.ID.as(aliasExtensionId), DSL.round(DSL.avg(EXTENSION_REVIEW.RATING)).as(aliasAverageRating) ) .from(EXTENSION) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_REVIEW).on(EXTENSION_REVIEW.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionReviewState).on(extensionReviewState.ENTITY_ID.eq(EXTENSION_REVIEW.ID).and(extensionReviewState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_REVIEW))) - .join(lastChangedExtensionReviewState).on(lastChangedExtensionReviewState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionReviewState.ENTITY_ID).and(lastChangedExtensionReviewState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionReviewState.TIMESTAMP))) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionReviewState.ACTIVE.eq(true)) + .join(EXTENSION_REVIEW).on(EXTENSION_REVIEW.EXTENSION_ID.eq(EXTENSION.ID)) + .where(EXTENSION.ACTIVE.eq(true)) + .and(EXTENSION_REVIEW.ACTIVE.eq(true)) .groupBy(EXTENSION.ID) .asTable("aer"); @@ -156,12 +109,7 @@ public Map countActiveExtensionsGroupedByExtensionReviewRating( .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - public double averageNumberOfActiveReviewsPerActiveExtension(LocalDateTime endExclusive) { - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionReviewState = ENTITY_ACTIVE_STATE.as("ers"); - var lastChangedExtensionReviewState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_REVIEW).asTable("aer"); - + public double averageNumberOfActiveReviewsPerActiveExtension() { var averageReviewsPerExtension = DSL.case_() .when(DSL.count(EXTENSION.ID).greaterThan(0), DSL.count(EXTENSION_REVIEW.ID).divide(DSL.countDistinct(EXTENSION.ID).times(1.0))) .otherwise(0) @@ -170,48 +118,32 @@ public double averageNumberOfActiveReviewsPerActiveExtension(LocalDateTime endEx return dsl.select(averageReviewsPerExtension) .from(EXTENSION) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_REVIEW).on(EXTENSION_REVIEW.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionReviewState).on(extensionReviewState.ENTITY_ID.eq(EXTENSION_REVIEW.ID).and(extensionReviewState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_REVIEW))) - .join(lastChangedExtensionReviewState).on(lastChangedExtensionReviewState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionReviewState.ENTITY_ID).and(lastChangedExtensionReviewState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionReviewState.TIMESTAMP))) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionReviewState.ACTIVE.eq(true)) + .join(EXTENSION_REVIEW).on(EXTENSION_REVIEW.EXTENSION_ID.eq(EXTENSION.ID)) + .where(EXTENSION.ACTIVE.eq(true)) + .and(EXTENSION_REVIEW.ACTIVE.eq(true)) .fetchOne(averageReviewsPerExtension); } - public int countPublishersThatClaimedNamespaceOwnership(LocalDateTime endExclusive) { + public int countPublishersThatClaimedNamespaceOwnership() { var count = DSL.countDistinct(NAMESPACE_MEMBERSHIP.USER_DATA); - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionVersionState = ENTITY_ACTIVE_STATE.as("evs"); - var lastChangedExtensionVersionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_VERSION).asTable("aev"); return dsl.select(count) .from(EXTENSION) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionVersionState).on(extensionVersionState.ENTITY_ID.eq(EXTENSION_VERSION.ID).and(extensionVersionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_VERSION))) - .join(lastChangedExtensionVersionState).on(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionVersionState.ENTITY_ID).and(lastChangedExtensionVersionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionVersionState.TIMESTAMP))) + .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(EXTENSION.ID)) .join(PERSONAL_ACCESS_TOKEN).on(PERSONAL_ACCESS_TOKEN.ID.eq(EXTENSION_VERSION.PUBLISHED_WITH_ID)) .join(NAMESPACE_MEMBERSHIP).on(NAMESPACE_MEMBERSHIP.USER_DATA.eq(PERSONAL_ACCESS_TOKEN.USER_DATA).and(NAMESPACE_MEMBERSHIP.NAMESPACE.eq(EXTENSION.NAMESPACE_ID))) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionVersionState.ACTIVE.eq(true)) + .where(EXTENSION.ACTIVE.eq(true)) + .and(EXTENSION_VERSION.ACTIVE.eq(true)) .and(NAMESPACE_MEMBERSHIP.ROLE.eq(NamespaceMembership.ROLE_OWNER)) .fetchOne(count); } - public Map topMostActivePublishingUsers(LocalDateTime endExclusive, int limit) { + public Map topMostActivePublishingUsers(int limit) { var count = DSL.count(EXTENSION_VERSION.ID).as("extension_version_count"); - var extensionVersionState = ENTITY_ACTIVE_STATE.as("evs"); - var lastChangedExtensionVersionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_VERSION).asTable("aev"); return dsl.select(USER_DATA.ID, USER_DATA.LOGIN_NAME, count) .from(EXTENSION_VERSION) - .join(extensionVersionState).on(extensionVersionState.ENTITY_ID.eq(EXTENSION_VERSION.ID).and(extensionVersionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_VERSION))) - .join(lastChangedExtensionVersionState).on(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionVersionState.ENTITY_ID).and(lastChangedExtensionVersionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionVersionState.TIMESTAMP))) .join(PERSONAL_ACCESS_TOKEN).on(PERSONAL_ACCESS_TOKEN.ID.eq(EXTENSION_VERSION.PUBLISHED_WITH_ID)) .join(USER_DATA).on(USER_DATA.ID.eq(PERSONAL_ACCESS_TOKEN.USER_DATA)) - .where(extensionVersionState.ACTIVE.eq(true)) + .where(EXTENSION_VERSION.ACTIVE.eq(true)) .groupBy(USER_DATA.ID) .orderBy(count.desc()) .limit(limit) @@ -225,16 +157,12 @@ public Map topMostActivePublishingUsers(LocalDateTime endExclus .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - public Map topNamespaceExtensions(LocalDateTime endExclusive, int limit) { + public Map topNamespaceExtensions(int limit) { var count = DSL.count(EXTENSION.ID).as("extension_count"); - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); return dsl.select(NAMESPACE.ID, NAMESPACE.NAME, count) .from(NAMESPACE) .join(EXTENSION).on(EXTENSION.NAMESPACE_ID.eq(NAMESPACE.ID)) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .where(extensionState.ACTIVE.eq(true)) + .where(EXTENSION.ACTIVE.eq(true)) .groupBy(NAMESPACE.ID) .orderBy(count.desc()) .limit(limit) @@ -248,22 +176,14 @@ public Map topNamespaceExtensions(LocalDateTime endExclusive, i .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - public Map topNamespaceExtensionVersions(LocalDateTime endExclusive, int limit) { + public Map topNamespaceExtensionVersions(int limit) { var count = DSL.count(EXTENSION_VERSION.ID).as("extension_version_count"); - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionVersionState = ENTITY_ACTIVE_STATE.as("evs"); - var lastChangedExtensionVersionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_VERSION).asTable("aev"); return dsl.select(NAMESPACE.ID, NAMESPACE.NAME, count) .from(NAMESPACE) .join(EXTENSION).on(EXTENSION.NAMESPACE_ID.eq(NAMESPACE.ID)) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionVersionState).on(extensionVersionState.ENTITY_ID.eq(EXTENSION_VERSION.ID).and(extensionVersionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_VERSION))) - .join(lastChangedExtensionVersionState).on(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionVersionState.ENTITY_ID).and(lastChangedExtensionVersionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionVersionState.TIMESTAMP))) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionVersionState.ACTIVE.eq(true)) + .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(EXTENSION.ID)) + .where(EXTENSION.ACTIVE.eq(true)) + .and(EXTENSION_VERSION.ACTIVE.eq(true)) .groupBy(NAMESPACE.ID) .orderBy(count.desc()) .limit(limit) @@ -277,47 +197,18 @@ public Map topNamespaceExtensionVersions(LocalDateTime endExclu .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - public Map topMostDownloadedExtensions(LocalDateTime endExclusive, int limit) { - var downloads = DSL.sum(DOWNLOAD.AMOUNT); - var extensionState = ENTITY_ACTIVE_STATE.as("es"); - var lastChangedExtensionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION).asTable("ae"); - var extensionVersionState = ENTITY_ACTIVE_STATE.as("evs"); - var lastChangedExtensionVersionState = findLastChangedEntityStates(endExclusive, ENTITY_TYPE_EXTENSION_VERSION).asTable("aev"); - var downloadsQuery = dsl.select(EXTENSION.ID, EXTENSION.NAMESPACE_ID, EXTENSION.NAME, downloads) + public Map topMostDownloadedExtensions(int limit) { + var downloads = EXTENSION.DOWNLOAD_COUNT; + var extensionId = DSL.concat(NAMESPACE.NAME, DSL.value("."), EXTENSION.NAME); + return dsl.select(extensionId, downloads) .from(NAMESPACE) .join(EXTENSION).on(EXTENSION.NAMESPACE_ID.eq(NAMESPACE.ID)) - .join(extensionState).on(extensionState.ENTITY_ID.eq(EXTENSION.ID).and(extensionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION))) - .join(lastChangedExtensionState).on(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionState.ENTITY_ID).and(lastChangedExtensionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionState.TIMESTAMP))) - .join(EXTENSION_VERSION).on(EXTENSION_VERSION.EXTENSION_ID.eq(lastChangedExtensionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(extensionVersionState).on(extensionVersionState.ENTITY_ID.eq(EXTENSION_VERSION.ID).and(extensionVersionState.ENTITY_TYPE.eq(ENTITY_TYPE_EXTENSION_VERSION))) - .join(lastChangedExtensionVersionState).on(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID).eq(extensionVersionState.ENTITY_ID).and(lastChangedExtensionVersionState.field(ALIAS_LAST_CHANGE, LocalDateTime.class).eq(extensionVersionState.TIMESTAMP))) - .join(FILE_RESOURCE).on(FILE_RESOURCE.EXTENSION_ID.eq(lastChangedExtensionVersionState.field(ENTITY_ACTIVE_STATE.ENTITY_ID))) - .join(DOWNLOAD).on(DOWNLOAD.FILE_RESOURCE_ID_NOT_FK.eq(FILE_RESOURCE.ID)) - .where(extensionState.ACTIVE.eq(true)) - .and(extensionVersionState.ACTIVE.eq(true)) - .groupBy(EXTENSION.ID) + .where(EXTENSION.ACTIVE.eq(true)) .orderBy(downloads.desc()) .limit(limit) - .asTable("ext"); - - var extensionId = DSL.concat(NAMESPACE.NAME, DSL.value("."), downloadsQuery.field(EXTENSION.NAME)); - return dsl.select(extensionId, downloadsQuery.field(downloads)) - .from(downloadsQuery) - .join(NAMESPACE).on(NAMESPACE.ID.eq(downloadsQuery.field(EXTENSION.NAMESPACE_ID))) .fetch() .stream() - .map(r -> { - var downloadCount = r.get(downloadsQuery.field(downloads)).longValue(); - return Map.entry(r.get(extensionId), downloadCount); - }) + .map(r -> Map.entry(r.get(extensionId), r.get(downloads).longValue())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - - private SelectHavingStep> findLastChangedEntityStates(LocalDateTime endExclusive, String entityType) { - return dsl.select(ENTITY_ACTIVE_STATE.ENTITY_ID, DSL.max(ENTITY_ACTIVE_STATE.TIMESTAMP).as(ALIAS_LAST_CHANGE)) - .from(ENTITY_ACTIVE_STATE) - .where(ENTITY_ACTIVE_STATE.TIMESTAMP.lessThan(endExclusive)) - .and(ENTITY_ACTIVE_STATE.ENTITY_TYPE.eq(entityType)) - .groupBy(ENTITY_ACTIVE_STATE.ENTITY_ID); - } } diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java b/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java index 925436382..a9332eaf5 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java @@ -360,52 +360,48 @@ public AdminStatistics findAdminStatisticsByYearAndMonth(int year, int month) { return adminStatisticsRepo.findByYearAndMonth(year, month); } - public long countActiveExtensions(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.countActiveExtensions(endExclusive); + public long countActiveExtensions() { + return adminStatisticCalculationsRepo.countActiveExtensions(); } - public long countActiveExtensionPublishers(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.countActiveExtensionPublishers(endExclusive); + public long countActiveExtensionPublishers() { + return adminStatisticCalculationsRepo.countActiveExtensionPublishers(); } - public Map countActiveExtensionPublishersGroupedByExtensionsPublished(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.countActiveExtensionPublishersGroupedByExtensionsPublished(endExclusive); + public Map countActiveExtensionPublishersGroupedByExtensionsPublished() { + return adminStatisticCalculationsRepo.countActiveExtensionPublishersGroupedByExtensionsPublished(); } - public Map countActiveExtensionsGroupedByExtensionReviewRating(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.countActiveExtensionsGroupedByExtensionReviewRating(endExclusive); + public Map countActiveExtensionsGroupedByExtensionReviewRating() { + return adminStatisticCalculationsRepo.countActiveExtensionsGroupedByExtensionReviewRating(); } - public double averageNumberOfActiveReviewsPerActiveExtension(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.averageNumberOfActiveReviewsPerActiveExtension(endExclusive); + public double averageNumberOfActiveReviewsPerActiveExtension() { + return adminStatisticCalculationsRepo.averageNumberOfActiveReviewsPerActiveExtension(); } - public long countPublishersThatClaimedNamespaceOwnership(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.countPublishersThatClaimedNamespaceOwnership(endExclusive); + public long countPublishersThatClaimedNamespaceOwnership() { + return adminStatisticCalculationsRepo.countPublishersThatClaimedNamespaceOwnership(); } - public long downloadsUntil(LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.downloadsSumByTimestampLessThan(endExclusive); + public long downloadsTotal() { + return adminStatisticCalculationsRepo.downloadsTotal(); } - public long downloadsBetween(LocalDateTime startInclusive, LocalDateTime endExclusive) { - return adminStatisticCalculationsRepo.downloadsSumByTimestampGreaterThanEqualAndTimestampLessThan(startInclusive, endExclusive); + public Map topMostActivePublishingUsers(int limit) { + return adminStatisticCalculationsRepo.topMostActivePublishingUsers(limit); } - public Map topMostActivePublishingUsers(LocalDateTime endExclusive, int limit) { - return adminStatisticCalculationsRepo.topMostActivePublishingUsers(endExclusive, limit); + public Map topNamespaceExtensions(int limit) { + return adminStatisticCalculationsRepo.topNamespaceExtensions(limit); } - public Map topNamespaceExtensions(LocalDateTime endExclusive, int limit) { - return adminStatisticCalculationsRepo.topNamespaceExtensions(endExclusive, limit); + public Map topNamespaceExtensionVersions(int limit) { + return adminStatisticCalculationsRepo.topNamespaceExtensionVersions(limit); } - public Map topNamespaceExtensionVersions(LocalDateTime endExclusive, int limit) { - return adminStatisticCalculationsRepo.topNamespaceExtensionVersions(endExclusive, limit); - } - - public Map topMostDownloadedExtensions(LocalDateTime endExclusive, int limit) { - return adminStatisticCalculationsRepo.topMostDownloadedExtensions(endExclusive, limit); + public Map topMostDownloadedExtensions(int limit) { + return adminStatisticCalculationsRepo.topMostDownloadedExtensions(limit); } public Streamable findTargetPlatformVersions(String version, String extensionName, String namespaceName) { diff --git a/server/src/main/java/org/eclipse/openvsx/security/SecurityConfig.java b/server/src/main/java/org/eclipse/openvsx/security/SecurityConfig.java index 641b28ba4..076e40d9b 100644 --- a/server/src/main/java/org/eclipse/openvsx/security/SecurityConfig.java +++ b/server/src/main/java/org/eclipse/openvsx/security/SecurityConfig.java @@ -47,7 +47,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .permitAll() .requestMatchers(antMatchers("/api/*/*/review", "/api/*/*/review/delete", "/api/user/publish", "/api/user/namespace/create")) .authenticated() - .requestMatchers(antMatchers("/api/**", "/vscode/**", "/documents/**", "/admin/report", "/admin/reports", "/admin/report/schedule")) + .requestMatchers(antMatchers("/api/**", "/vscode/**", "/documents/**", "/admin/report")) .permitAll() .requestMatchers(antMatchers("/admin/**")) .hasAuthority("ROLE_ADMIN") @@ -58,7 +58,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { ) .cors(configurer -> configurer.configure(http)) .csrf(configurer -> { - configurer.ignoringRequestMatchers(antMatchers("/api/-/publish", "/api/-/namespace/create", "/api/-/query", "/admin/report/schedule", "/vscode/**")); + configurer.ignoringRequestMatchers(antMatchers("/api/-/publish", "/api/-/namespace/create", "/api/-/query", "/vscode/**")); }) .exceptionHandling(configurer -> configurer.authenticationEntryPoint(new Http403ForbiddenEntryPoint())) .oauth2Login(configurer -> { diff --git a/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountProcessor.java b/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountProcessor.java index 7085c0065..e84b11dfd 100644 --- a/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountProcessor.java +++ b/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountProcessor.java @@ -54,33 +54,21 @@ public void persistProcessedItem(String name, LocalDateTime processedOn, int exe entityManager.persist(processedItem); } - public Map> processDownloadCounts(Map> files) { + public Map processDownloadCounts(Map files) { return repositories.findDownloadsByStorageTypeAndName(STORAGE_AZURE, files.keySet()).stream() - .map(fileResource -> new AbstractMap.SimpleEntry<>(fileResource, toDownloads(fileResource, files))) + .map(fileResource -> new AbstractMap.SimpleEntry<>(fileResource, files.get(fileResource.getName().toUpperCase()))) .collect(Collectors.groupingBy( e -> e.getKey().getExtension().getExtension().getId(), - Collectors.mapping(Map.Entry::getValue, Collectors.flatMapping(List::stream, Collectors.toList())) + Collectors.summingInt(Map.Entry::getValue) )); } - private List toDownloads(FileResource fileResource, Map> files) { - return files.get(fileResource.getName().toUpperCase()).stream() - .map(time -> { - var download = new Download(); - download.setAmount(1); - download.setTimestamp(time); - download.setFileResourceId(fileResource.getId()); - return download; - }).collect(Collectors.toList()); - } - @Transactional - public List increaseDownloadCounts(Map> extensionDownloads) { + public List increaseDownloadCounts(Map extensionDownloads) { var extensions = repositories.findExtensions(extensionDownloads.keySet()).toList(); extensions.forEach(extension -> { var downloads = extensionDownloads.get(extension.getId()); - downloads.forEach(entityManager::persist); - extension.setDownloadCount(extension.getDownloadCount() + downloads.size()); + extension.setDownloadCount(extension.getDownloadCount() + downloads); }); return extensions; diff --git a/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountService.java b/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountService.java index 72cb861e7..ce3528aba 100644 --- a/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountService.java +++ b/server/src/main/java/org/eclipse/openvsx/storage/AzureDownloadCountService.java @@ -36,7 +36,6 @@ import java.nio.file.Files; import java.time.Duration; import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; import java.util.AbstractMap; import java.util.ArrayList; import java.util.List; @@ -149,7 +148,7 @@ public void updateDownloadCounts() { logger.info("<< updateDownloadCounts"); } - private Map> processBlobItem(String blobName) { + private Map processBlobItem(String blobName) { try ( var downloadsTempFile = downloadBlobItem(blobName); var reader = Files.newBufferedReader(downloadsTempFile.getPath()) @@ -176,10 +175,9 @@ private Map> processBlobItem(String blobName) { .map(entry -> { var pathParams = entry.getKey(); var fileName = UriUtils.decode(pathParams[pathParams.length - 1], StandardCharsets.UTF_8).toUpperCase(); - var time = LocalDateTime.parse(entry.getValue(), DateTimeFormatter.ISO_ZONED_DATE_TIME); - return new AbstractMap.SimpleEntry<>(fileName, time); + return new AbstractMap.SimpleEntry<>(fileName, 1); }) - .collect(Collectors.groupingBy(Map.Entry::getKey, Collectors.mapping(Map.Entry::getValue, Collectors.toList()))); + .collect(Collectors.groupingBy(Map.Entry::getKey, Collectors.summingInt(Map.Entry::getValue))); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java b/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java index 4cdfe552e..cf5e42236 100644 --- a/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java +++ b/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java @@ -12,14 +12,12 @@ import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; import org.eclipse.openvsx.cache.CacheService; -import org.eclipse.openvsx.entities.Download; import org.eclipse.openvsx.entities.ExtensionVersion; import org.eclipse.openvsx.entities.FileResource; import org.eclipse.openvsx.entities.Namespace; import org.eclipse.openvsx.repositories.RepositoryService; import org.eclipse.openvsx.search.SearchUtilService; import org.eclipse.openvsx.util.TempFile; -import org.eclipse.openvsx.util.TimeUtil; import org.eclipse.openvsx.util.UrlUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -280,12 +278,6 @@ public void increaseDownloadCount(FileResource resource) { return; } - var download = new Download(); - download.setAmount(1); - download.setTimestamp(TimeUtil.getCurrentUTC()); - download.setFileResourceId(resource.getId()); - entityManager.persist(download); - resource = entityManager.merge(resource); var extension = resource.getExtension().getExtension(); extension.setDownloadCount(extension.getDownloadCount() + 1); diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/DefaultCatalog.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/DefaultCatalog.java index b4b72e243..3b15d2df6 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/DefaultCatalog.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/DefaultCatalog.java @@ -7,6 +7,7 @@ import java.util.Arrays; import java.util.List; +import org.jooq.Constants; import org.jooq.Schema; import org.jooq.impl.CatalogImpl; @@ -38,7 +39,16 @@ private DefaultCatalog() { @Override public final List getSchemas() { - return Arrays.asList( - Public.PUBLIC); + return Arrays.asList( + Public.PUBLIC + ); } + + /** + * A reference to the 3.18 minor release of the code generator. If this + * doesn't compile, it's because the runtime library uses an older minor + * release, namely: 3.18. You can turn off the generation of this reference + * by specifying /configuration/generator/generate/jooqVersionReference + */ + private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18; } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Indexes.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Indexes.java index 24597bc1a..e749a5524 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Indexes.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Indexes.java @@ -5,7 +5,6 @@ import org.eclipse.openvsx.jooq.tables.AdminStatistics; -import org.eclipse.openvsx.jooq.tables.Download; import org.eclipse.openvsx.jooq.tables.Extension; import org.eclipse.openvsx.jooq.tables.ExtensionReview; import org.eclipse.openvsx.jooq.tables.ExtensionVersion; @@ -13,6 +12,7 @@ import org.eclipse.openvsx.jooq.tables.FlywaySchemaHistory; import org.eclipse.openvsx.jooq.tables.JobrunrBackgroundjobservers; import org.eclipse.openvsx.jooq.tables.JobrunrJobs; +import org.eclipse.openvsx.jooq.tables.JobrunrRecurringJobs; import org.eclipse.openvsx.jooq.tables.NamespaceMembership; import org.eclipse.openvsx.jooq.tables.PersistedLog; import org.eclipse.openvsx.jooq.tables.SpringSession; @@ -32,7 +32,6 @@ public class Indexes { // INDEX definitions // ------------------------------------------------------------------------- - public static final Index DOWNLOAD_TIMESTAMP_BRIN_IDX = Internal.createIndex(DSL.name("download_timestamp_brin_idx"), Download.DOWNLOAD, new OrderField[] { Download.DOWNLOAD.TIMESTAMP }, false); public static final Index EXTENSION__NAMESPACE_ID__IDX = Internal.createIndex(DSL.name("extension__namespace_id__idx"), Extension.EXTENSION, new OrderField[] { Extension.EXTENSION.NAMESPACE_ID }, false); public static final Index EXTENSION_REVIEW__EXTENSION_ID__IDX = Internal.createIndex(DSL.name("extension_review__extension_id__idx"), ExtensionReview.EXTENSION_REVIEW, new OrderField[] { ExtensionReview.EXTENSION_REVIEW.EXTENSION_ID }, false); public static final Index EXTENSION_REVIEW__USER_ID__IDX = Internal.createIndex(DSL.name("extension_review__user_id__idx"), ExtensionReview.EXTENSION_REVIEW, new OrderField[] { ExtensionReview.EXTENSION_REVIEW.USER_ID }, false); @@ -52,7 +51,8 @@ public class Indexes { public static final Index JOBRUNR_JOB_RCI_IDX = Internal.createIndex(DSL.name("jobrunr_job_rci_idx"), JobrunrJobs.JOBRUNR_JOBS, new OrderField[] { JobrunrJobs.JOBRUNR_JOBS.RECURRINGJOBID }, false); public static final Index JOBRUNR_JOB_SCHEDULED_AT_IDX = Internal.createIndex(DSL.name("jobrunr_job_scheduled_at_idx"), JobrunrJobs.JOBRUNR_JOBS, new OrderField[] { JobrunrJobs.JOBRUNR_JOBS.SCHEDULEDAT }, false); public static final Index JOBRUNR_JOB_SIGNATURE_IDX = Internal.createIndex(DSL.name("jobrunr_job_signature_idx"), JobrunrJobs.JOBRUNR_JOBS, new OrderField[] { JobrunrJobs.JOBRUNR_JOBS.JOBSIGNATURE }, false); - public static final Index JOBRUNR_JOB_UPDATED_AT_IDX = Internal.createIndex(DSL.name("jobrunr_job_updated_at_idx"), JobrunrJobs.JOBRUNR_JOBS, new OrderField[] { JobrunrJobs.JOBRUNR_JOBS.UPDATEDAT }, false); + public static final Index JOBRUNR_JOBS_STATE_UPDATED_IDX = Internal.createIndex(DSL.name("jobrunr_jobs_state_updated_idx"), JobrunrJobs.JOBRUNR_JOBS, new OrderField[] { JobrunrJobs.JOBRUNR_JOBS.STATE, JobrunrJobs.JOBRUNR_JOBS.UPDATEDAT }, false); + public static final Index JOBRUNR_RECURRING_JOB_CREATED_AT_IDX = Internal.createIndex(DSL.name("jobrunr_recurring_job_created_at_idx"), JobrunrRecurringJobs.JOBRUNR_RECURRING_JOBS, new OrderField[] { JobrunrRecurringJobs.JOBRUNR_RECURRING_JOBS.CREATEDAT }, false); public static final Index JOBRUNR_STATE_IDX = Internal.createIndex(DSL.name("jobrunr_state_idx"), JobrunrJobs.JOBRUNR_JOBS, new OrderField[] { JobrunrJobs.JOBRUNR_JOBS.STATE }, false); public static final Index NAMESPACE_MEMBERSHIP__NAMESPACE__IDX = Internal.createIndex(DSL.name("namespace_membership__namespace__idx"), NamespaceMembership.NAMESPACE_MEMBERSHIP, new OrderField[] { NamespaceMembership.NAMESPACE_MEMBERSHIP.NAMESPACE }, false); public static final Index NAMESPACE_MEMBERSHIP__USER_DATA__IDX = Internal.createIndex(DSL.name("namespace_membership__user_data__idx"), NamespaceMembership.NAMESPACE_MEMBERSHIP, new OrderField[] { NamespaceMembership.NAMESPACE_MEMBERSHIP.USER_DATA }, false); diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Keys.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Keys.java index e3ffdb499..3b52edc0c 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Keys.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Keys.java @@ -12,8 +12,6 @@ import org.eclipse.openvsx.jooq.tables.AdminStatisticsTopNamespaceExtensionVersions; import org.eclipse.openvsx.jooq.tables.AdminStatisticsTopNamespaceExtensions; import org.eclipse.openvsx.jooq.tables.AzureDownloadCountProcessedItem; -import org.eclipse.openvsx.jooq.tables.Download; -import org.eclipse.openvsx.jooq.tables.EntityActiveState; import org.eclipse.openvsx.jooq.tables.Extension; import org.eclipse.openvsx.jooq.tables.ExtensionReview; import org.eclipse.openvsx.jooq.tables.ExtensionVersion; @@ -43,8 +41,6 @@ import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsTopNamespaceExtensionVersionsRecord; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsTopNamespaceExtensionsRecord; import org.eclipse.openvsx.jooq.tables.records.AzureDownloadCountProcessedItemRecord; -import org.eclipse.openvsx.jooq.tables.records.DownloadRecord; -import org.eclipse.openvsx.jooq.tables.records.EntityActiveStateRecord; import org.eclipse.openvsx.jooq.tables.records.ExtensionRecord; import org.eclipse.openvsx.jooq.tables.records.ExtensionReviewRecord; import org.eclipse.openvsx.jooq.tables.records.ExtensionVersionRecord; @@ -74,7 +70,7 @@ /** - * A class modelling foreign key relationships and constraints of tables in + * A class modelling foreign key relationships and constraints of tables in * public. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) @@ -86,8 +82,6 @@ public class Keys { public static final UniqueKey ADMIN_STATISTICS_PKEY = Internal.createUniqueKey(AdminStatistics.ADMIN_STATISTICS, DSL.name("admin_statistics_pkey"), new TableField[] { AdminStatistics.ADMIN_STATISTICS.ID }, true); public static final UniqueKey AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM_PKEY = Internal.createUniqueKey(AzureDownloadCountProcessedItem.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM, DSL.name("azure_download_count_processed_item_pkey"), new TableField[] { AzureDownloadCountProcessedItem.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM.ID }, true); - public static final UniqueKey DOWNLOAD_PKEY = Internal.createUniqueKey(Download.DOWNLOAD, DSL.name("download_pkey"), new TableField[] { Download.DOWNLOAD.ID }, true); - public static final UniqueKey ENTITY_ACTIVE_STATE_PKEY = Internal.createUniqueKey(EntityActiveState.ENTITY_ACTIVE_STATE, DSL.name("entity_active_state_pkey"), new TableField[] { EntityActiveState.ENTITY_ACTIVE_STATE.ID }, true); public static final UniqueKey EXTENSION_PKEY = Internal.createUniqueKey(Extension.EXTENSION, DSL.name("extension_pkey"), new TableField[] { Extension.EXTENSION.ID }, true); public static final UniqueKey UNIQUE_EXTENSION_PUBLIC_ID = Internal.createUniqueKey(Extension.EXTENSION, DSL.name("unique_extension_public_id"), new TableField[] { Extension.EXTENSION.PUBLIC_ID }, true); public static final UniqueKey EXTENSION_REVIEW_PKEY = Internal.createUniqueKey(ExtensionReview.EXTENSION_REVIEW, DSL.name("extension_review_pkey"), new TableField[] { ExtensionReview.EXTENSION_REVIEW.ID }, true); @@ -104,13 +98,16 @@ public class Keys { public static final UniqueKey NAMESPACE_PKEY = Internal.createUniqueKey(Namespace.NAMESPACE, DSL.name("namespace_pkey"), new TableField[] { Namespace.NAMESPACE.ID }, true); public static final UniqueKey UNIQUE_NAMESPACE_PUBLIC_ID = Internal.createUniqueKey(Namespace.NAMESPACE, DSL.name("unique_namespace_public_id"), new TableField[] { Namespace.NAMESPACE.PUBLIC_ID }, true); public static final UniqueKey NAMESPACE_MEMBERSHIP_PKEY = Internal.createUniqueKey(NamespaceMembership.NAMESPACE_MEMBERSHIP, DSL.name("namespace_membership_pkey"), new TableField[] { NamespaceMembership.NAMESPACE_MEMBERSHIP.ID }, true); + public static final UniqueKey UNIQUE_NAMESPACE_MEMBERSHIP = Internal.createUniqueKey(NamespaceMembership.NAMESPACE_MEMBERSHIP, DSL.name("unique_namespace_membership"), new TableField[] { NamespaceMembership.NAMESPACE_MEMBERSHIP.USER_DATA, NamespaceMembership.NAMESPACE_MEMBERSHIP.NAMESPACE }, true); public static final UniqueKey PERSISTED_LOG_PKEY = Internal.createUniqueKey(PersistedLog.PERSISTED_LOG, DSL.name("persisted_log_pkey"), new TableField[] { PersistedLog.PERSISTED_LOG.ID }, true); public static final UniqueKey PERSONAL_ACCESS_TOKEN_PKEY = Internal.createUniqueKey(PersonalAccessToken.PERSONAL_ACCESS_TOKEN, DSL.name("personal_access_token_pkey"), new TableField[] { PersonalAccessToken.PERSONAL_ACCESS_TOKEN.ID }, true); public static final UniqueKey UKJEUD5MSSQBQKID58RD2K1INOF = Internal.createUniqueKey(PersonalAccessToken.PERSONAL_ACCESS_TOKEN, DSL.name("ukjeud5mssqbqkid58rd2k1inof"), new TableField[] { PersonalAccessToken.PERSONAL_ACCESS_TOKEN.VALUE }, true); public static final UniqueKey SHEDLOCK_PKEY = Internal.createUniqueKey(Shedlock.SHEDLOCK, DSL.name("shedlock_pkey"), new TableField[] { Shedlock.SHEDLOCK.NAME }, true); public static final UniqueKey SIGNATURE_KEY_PAIR_PKEY = Internal.createUniqueKey(SignatureKeyPair.SIGNATURE_KEY_PAIR, DSL.name("signature_key_pair_pkey"), new TableField[] { SignatureKeyPair.SIGNATURE_KEY_PAIR.ID }, true); + public static final UniqueKey SIGNATURE_KEY_PAIR_UNIQUE_PUBLIC_ID = Internal.createUniqueKey(SignatureKeyPair.SIGNATURE_KEY_PAIR, DSL.name("signature_key_pair_unique_public_id"), new TableField[] { SignatureKeyPair.SIGNATURE_KEY_PAIR.PUBLIC_ID }, true); public static final UniqueKey SPRING_SESSION_PK = Internal.createUniqueKey(SpringSession.SPRING_SESSION, DSL.name("spring_session_pk"), new TableField[] { SpringSession.SPRING_SESSION.PRIMARY_ID }, true); public static final UniqueKey SPRING_SESSION_ATTRIBUTES_PK = Internal.createUniqueKey(SpringSessionAttributes.SPRING_SESSION_ATTRIBUTES, DSL.name("spring_session_attributes_pk"), new TableField[] { SpringSessionAttributes.SPRING_SESSION_ATTRIBUTES.SESSION_PRIMARY_ID, SpringSessionAttributes.SPRING_SESSION_ATTRIBUTES.ATTRIBUTE_NAME }, true); + public static final UniqueKey UNIQUE_USER_DATA = Internal.createUniqueKey(UserData.USER_DATA, DSL.name("unique_user_data"), new TableField[] { UserData.USER_DATA.PROVIDER, UserData.USER_DATA.LOGIN_NAME }, true); public static final UniqueKey USER_DATA_PKEY = Internal.createUniqueKey(UserData.USER_DATA, DSL.name("user_data_pkey"), new TableField[] { UserData.USER_DATA.ID }, true); // ------------------------------------------------------------------------- diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Public.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Public.java index dc30fa262..12d5ca6fc 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Public.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Public.java @@ -15,8 +15,6 @@ import org.eclipse.openvsx.jooq.tables.AdminStatisticsTopNamespaceExtensionVersions; import org.eclipse.openvsx.jooq.tables.AdminStatisticsTopNamespaceExtensions; import org.eclipse.openvsx.jooq.tables.AzureDownloadCountProcessedItem; -import org.eclipse.openvsx.jooq.tables.Download; -import org.eclipse.openvsx.jooq.tables.EntityActiveState; import org.eclipse.openvsx.jooq.tables.Extension; import org.eclipse.openvsx.jooq.tables.ExtensionReview; import org.eclipse.openvsx.jooq.tables.ExtensionVersion; @@ -69,22 +67,26 @@ public class Public extends SchemaImpl { public final AdminStatisticsExtensionsByRating ADMIN_STATISTICS_EXTENSIONS_BY_RATING = AdminStatisticsExtensionsByRating.ADMIN_STATISTICS_EXTENSIONS_BY_RATING; /** - * The table public.admin_statistics_publishers_by_extensions_published. + * The table + * public.admin_statistics_publishers_by_extensions_published. */ public final AdminStatisticsPublishersByExtensionsPublished ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED = AdminStatisticsPublishersByExtensionsPublished.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED; /** - * The table public.admin_statistics_top_most_active_publishing_users. + * The table + * public.admin_statistics_top_most_active_publishing_users. */ public final AdminStatisticsTopMostActivePublishingUsers ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS = AdminStatisticsTopMostActivePublishingUsers.ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS; /** - * The table public.admin_statistics_top_most_downloaded_extensions. + * The table + * public.admin_statistics_top_most_downloaded_extensions. */ public final AdminStatisticsTopMostDownloadedExtensions ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS = AdminStatisticsTopMostDownloadedExtensions.ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS; /** - * The table public.admin_statistics_top_namespace_extension_versions. + * The table + * public.admin_statistics_top_namespace_extension_versions. */ public final AdminStatisticsTopNamespaceExtensionVersions ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS = AdminStatisticsTopNamespaceExtensionVersions.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS; @@ -98,16 +100,6 @@ public class Public extends SchemaImpl { */ public final AzureDownloadCountProcessedItem AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM = AzureDownloadCountProcessedItem.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM; - /** - * The table public.download. - */ - public final Download DOWNLOAD = Download.DOWNLOAD; - - /** - * The table public.entity_active_state. - */ - public final EntityActiveState ENTITY_ACTIVE_STATE = EntityActiveState.ENTITY_ACTIVE_STATE; - /** * The table public.extension. */ @@ -233,16 +225,27 @@ public Catalog getCatalog() { @Override public final List> getSequences() { - return Arrays.>asList( - Sequences.DOWNLOAD_ID_SEQ, - Sequences.ENTITY_ACTIVE_STATE_ID_SEQ, - Sequences.FILE_RESOURCE_ID_SEQ, - Sequences.HIBERNATE_SEQUENCE); + return Arrays.asList( + Sequences.ADMIN_STATISTICS_SEQ, + Sequences.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM_SEQ, + Sequences.EXTENSION_REVIEW_SEQ, + Sequences.EXTENSION_SEQ, + Sequences.EXTENSION_VERSION_SEQ, + Sequences.FILE_RESOURCE_SEQ, + Sequences.HIBERNATE_SEQUENCE, + Sequences.MIGRATION_ITEM_SEQ, + Sequences.NAMESPACE_MEMBERSHIP_SEQ, + Sequences.NAMESPACE_SEQ, + Sequences.PERSISTED_LOG_SEQ, + Sequences.PERSONAL_ACCESS_TOKEN_SEQ, + Sequences.SIGNATURE_KEY_PAIR_SEQ, + Sequences.USER_DATA_SEQ + ); } @Override public final List> getTables() { - return Arrays.>asList( + return Arrays.asList( AdminStatistics.ADMIN_STATISTICS, AdminStatisticsExtensionsByRating.ADMIN_STATISTICS_EXTENSIONS_BY_RATING, AdminStatisticsPublishersByExtensionsPublished.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED, @@ -251,8 +254,6 @@ public final List> getTables() { AdminStatisticsTopNamespaceExtensionVersions.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS, AdminStatisticsTopNamespaceExtensions.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS, AzureDownloadCountProcessedItem.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM, - Download.DOWNLOAD, - EntityActiveState.ENTITY_ACTIVE_STATE, Extension.EXTENSION, ExtensionReview.EXTENSION_REVIEW, ExtensionVersion.EXTENSION_VERSION, @@ -274,6 +275,7 @@ public final List> getTables() { SignatureKeyPair.SIGNATURE_KEY_PAIR, SpringSession.SPRING_SESSION, SpringSessionAttributes.SPRING_SESSION_ATTRIBUTES, - UserData.USER_DATA); + UserData.USER_DATA + ); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Sequences.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Sequences.java index dd70831f3..48bc53cff 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Sequences.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Sequences.java @@ -16,22 +16,72 @@ public class Sequences { /** - * The sequence public.download_id_seq + * The sequence public.admin_statistics_seq */ - public static final Sequence DOWNLOAD_ID_SEQ = Internal.createSequence("download_id_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, null, null, null, false, null); + public static final Sequence ADMIN_STATISTICS_SEQ = Internal.createSequence("admin_statistics_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); /** - * The sequence public.entity_active_state_id_seq + * The sequence public.azure_download_count_processed_item_seq */ - public static final Sequence ENTITY_ACTIVE_STATE_ID_SEQ = Internal.createSequence("entity_active_state_id_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, null, null, null, false, null); + public static final Sequence AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM_SEQ = Internal.createSequence("azure_download_count_processed_item_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); /** - * The sequence public.file_resource_id_seq + * The sequence public.extension_review_seq */ - public static final Sequence FILE_RESOURCE_ID_SEQ = Internal.createSequence("file_resource_id_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, null, null, null, false, null); + public static final Sequence EXTENSION_REVIEW_SEQ = Internal.createSequence("extension_review_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.extension_seq + */ + public static final Sequence EXTENSION_SEQ = Internal.createSequence("extension_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.extension_version_seq + */ + public static final Sequence EXTENSION_VERSION_SEQ = Internal.createSequence("extension_version_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.file_resource_seq + */ + public static final Sequence FILE_RESOURCE_SEQ = Internal.createSequence("file_resource_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); /** * The sequence public.hibernate_sequence */ public static final Sequence HIBERNATE_SEQUENCE = Internal.createSequence("hibernate_sequence", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, null, null, null, false, null); + + /** + * The sequence public.migration_item_seq + */ + public static final Sequence MIGRATION_ITEM_SEQ = Internal.createSequence("migration_item_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.namespace_membership_seq + */ + public static final Sequence NAMESPACE_MEMBERSHIP_SEQ = Internal.createSequence("namespace_membership_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.namespace_seq + */ + public static final Sequence NAMESPACE_SEQ = Internal.createSequence("namespace_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.persisted_log_seq + */ + public static final Sequence PERSISTED_LOG_SEQ = Internal.createSequence("persisted_log_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.personal_access_token_seq + */ + public static final Sequence PERSONAL_ACCESS_TOKEN_SEQ = Internal.createSequence("personal_access_token_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.signature_key_pair_seq + */ + public static final Sequence SIGNATURE_KEY_PAIR_SEQ = Internal.createSequence("signature_key_pair_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); + + /** + * The sequence public.user_data_seq + */ + public static final Sequence USER_DATA_SEQ = Internal.createSequence("user_data_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, 50, null, null, false, null); } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Tables.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Tables.java index 0b40132a9..5f4a85daf 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Tables.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/Tables.java @@ -12,8 +12,6 @@ import org.eclipse.openvsx.jooq.tables.AdminStatisticsTopNamespaceExtensionVersions; import org.eclipse.openvsx.jooq.tables.AdminStatisticsTopNamespaceExtensions; import org.eclipse.openvsx.jooq.tables.AzureDownloadCountProcessedItem; -import org.eclipse.openvsx.jooq.tables.Download; -import org.eclipse.openvsx.jooq.tables.EntityActiveState; import org.eclipse.openvsx.jooq.tables.Extension; import org.eclipse.openvsx.jooq.tables.ExtensionReview; import org.eclipse.openvsx.jooq.tables.ExtensionVersion; @@ -55,22 +53,26 @@ public class Tables { public static final AdminStatisticsExtensionsByRating ADMIN_STATISTICS_EXTENSIONS_BY_RATING = AdminStatisticsExtensionsByRating.ADMIN_STATISTICS_EXTENSIONS_BY_RATING; /** - * The table public.admin_statistics_publishers_by_extensions_published. + * The table + * public.admin_statistics_publishers_by_extensions_published. */ public static final AdminStatisticsPublishersByExtensionsPublished ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED = AdminStatisticsPublishersByExtensionsPublished.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED; /** - * The table public.admin_statistics_top_most_active_publishing_users. + * The table + * public.admin_statistics_top_most_active_publishing_users. */ public static final AdminStatisticsTopMostActivePublishingUsers ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS = AdminStatisticsTopMostActivePublishingUsers.ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS; /** - * The table public.admin_statistics_top_most_downloaded_extensions. + * The table + * public.admin_statistics_top_most_downloaded_extensions. */ public static final AdminStatisticsTopMostDownloadedExtensions ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS = AdminStatisticsTopMostDownloadedExtensions.ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS; /** - * The table public.admin_statistics_top_namespace_extension_versions. + * The table + * public.admin_statistics_top_namespace_extension_versions. */ public static final AdminStatisticsTopNamespaceExtensionVersions ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS = AdminStatisticsTopNamespaceExtensionVersions.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS; @@ -84,16 +86,6 @@ public class Tables { */ public static final AzureDownloadCountProcessedItem AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM = AzureDownloadCountProcessedItem.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM; - /** - * The table public.download. - */ - public static final Download DOWNLOAD = Download.DOWNLOAD; - - /** - * The table public.entity_active_state. - */ - public static final EntityActiveState ENTITY_ACTIVE_STATE = EntityActiveState.ENTITY_ACTIVE_STATE; - /** * The table public.extension. */ diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatistics.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatistics.java index 004cd75bc..7ab14045b 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatistics.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatistics.java @@ -6,6 +6,7 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -13,11 +14,14 @@ import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function9; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row9; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -84,7 +88,8 @@ public Class getRecordType() { public final TableField PUBLISHERS = createField(DSL.name("publishers"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics.average_reviews_per_extension. + * The column + * public.admin_statistics.average_reviews_per_extension. */ public final TableField AVERAGE_REVIEWS_PER_EXTENSION = createField(DSL.name("average_reviews_per_extension"), SQLDataType.DOUBLE.nullable(false), this, ""); @@ -128,12 +133,12 @@ public AdminStatistics(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.UNIQUE_ADMIN_STATISTICS); + return Arrays.asList(Indexes.UNIQUE_ADMIN_STATISTICS); } @Override @@ -141,11 +146,6 @@ public UniqueKey getPrimaryKey() { return Keys.ADMIN_STATISTICS_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_PKEY); - } - @Override public AdminStatistics as(String alias) { return new AdminStatistics(DSL.name(alias), this); @@ -156,6 +156,11 @@ public AdminStatistics as(Name alias) { return new AdminStatistics(alias, this); } + @Override + public AdminStatistics as(Table alias) { + return new AdminStatistics(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -172,6 +177,14 @@ public AdminStatistics rename(Name name) { return new AdminStatistics(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatistics rename(Table name) { + return new AdminStatistics(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row9 type methods // ------------------------------------------------------------------------- @@ -180,4 +193,19 @@ public AdminStatistics rename(Name name) { public Row9 fieldsRow() { return (Row9) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function9 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function9 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsExtensionsByRating.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsExtensionsByRating.java index ea408cbea..c0c2f56ef 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsExtensionsByRating.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsExtensionsByRating.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsExtensionsByRatingRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -33,7 +37,8 @@ public class AdminStatisticsExtensionsByRating extends TableImplpublic.admin_statistics_extensions_by_rating + * The reference instance of + * public.admin_statistics_extensions_by_rating */ public static final AdminStatisticsExtensionsByRating ADMIN_STATISTICS_EXTENSIONS_BY_RATING = new AdminStatisticsExtensionsByRating(); @@ -46,17 +51,20 @@ public Class getRecordType() { } /** - * The column public.admin_statistics_extensions_by_rating.admin_statistics_id. + * The column + * public.admin_statistics_extensions_by_rating.admin_statistics_id. */ public final TableField ADMIN_STATISTICS_ID = createField(DSL.name("admin_statistics_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics_extensions_by_rating.rating. + * The column + * public.admin_statistics_extensions_by_rating.rating. */ public final TableField RATING = createField(DSL.name("rating"), SQLDataType.INTEGER.nullable(false), this, ""); /** - * The column public.admin_statistics_extensions_by_rating.extensions. + * The column + * public.admin_statistics_extensions_by_rating.extensions. */ public final TableField EXTENSIONS = createField(DSL.name("extensions"), SQLDataType.INTEGER.nullable(false), this, ""); @@ -69,21 +77,24 @@ private AdminStatisticsExtensionsByRating(Name alias, Tablepublic.admin_statistics_extensions_by_rating table reference + * Create an aliased + * public.admin_statistics_extensions_by_rating table reference */ public AdminStatisticsExtensionsByRating(String alias) { this(DSL.name(alias), ADMIN_STATISTICS_EXTENSIONS_BY_RATING); } /** - * Create an aliased public.admin_statistics_extensions_by_rating table reference + * Create an aliased + * public.admin_statistics_extensions_by_rating table reference */ public AdminStatisticsExtensionsByRating(Name alias) { this(alias, ADMIN_STATISTICS_EXTENSIONS_BY_RATING); } /** - * Create a public.admin_statistics_extensions_by_rating table reference + * Create a public.admin_statistics_extensions_by_rating table + * reference */ public AdminStatisticsExtensionsByRating() { this(DSL.name("admin_statistics_extensions_by_rating"), null); @@ -95,16 +106,20 @@ public AdminStatisticsExtensionsByRating(Table child, Fore @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override public List> getReferences() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_EXTENSIONS_BY_RATING__ADMIN_STATISTICS_EXTENSIONS_BY_RATING_FKEY); + return Arrays.asList(Keys.ADMIN_STATISTICS_EXTENSIONS_BY_RATING__ADMIN_STATISTICS_EXTENSIONS_BY_RATING_FKEY); } private transient AdminStatistics _adminStatistics; + /** + * Get the implicit join path to the public.admin_statistics + * table. + */ public AdminStatistics adminStatistics() { if (_adminStatistics == null) _adminStatistics = new AdminStatistics(this, Keys.ADMIN_STATISTICS_EXTENSIONS_BY_RATING__ADMIN_STATISTICS_EXTENSIONS_BY_RATING_FKEY); @@ -122,6 +137,11 @@ public AdminStatisticsExtensionsByRating as(Name alias) { return new AdminStatisticsExtensionsByRating(alias, this); } + @Override + public AdminStatisticsExtensionsByRating as(Table alias) { + return new AdminStatisticsExtensionsByRating(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +158,14 @@ public AdminStatisticsExtensionsByRating rename(Name name) { return new AdminStatisticsExtensionsByRating(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatisticsExtensionsByRating rename(Table name) { + return new AdminStatisticsExtensionsByRating(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +174,19 @@ public AdminStatisticsExtensionsByRating rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsPublishersByExtensionsPublished.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsPublishersByExtensionsPublished.java index 46e554e11..b9edf8896 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsPublishersByExtensionsPublished.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsPublishersByExtensionsPublished.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsPublishersByExtensionsPublishedRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -33,7 +37,8 @@ public class AdminStatisticsPublishersByExtensionsPublished extends TableImplpublic.admin_statistics_publishers_by_extensions_published + * The reference instance of + * public.admin_statistics_publishers_by_extensions_published */ public static final AdminStatisticsPublishersByExtensionsPublished ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED = new AdminStatisticsPublishersByExtensionsPublished(); @@ -46,17 +51,20 @@ public Class getRecordType } /** - * The column public.admin_statistics_publishers_by_extensions_published.admin_statistics_id. + * The column + * public.admin_statistics_publishers_by_extensions_published.admin_statistics_id. */ public final TableField ADMIN_STATISTICS_ID = createField(DSL.name("admin_statistics_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics_publishers_by_extensions_published.extensions_published. + * The column + * public.admin_statistics_publishers_by_extensions_published.extensions_published. */ public final TableField EXTENSIONS_PUBLISHED = createField(DSL.name("extensions_published"), SQLDataType.INTEGER.nullable(false), this, ""); /** - * The column public.admin_statistics_publishers_by_extensions_published.publishers. + * The column + * public.admin_statistics_publishers_by_extensions_published.publishers. */ public final TableField PUBLISHERS = createField(DSL.name("publishers"), SQLDataType.INTEGER.nullable(false), this, ""); @@ -69,21 +77,27 @@ private AdminStatisticsPublishersByExtensionsPublished(Name alias, Tablepublic.admin_statistics_publishers_by_extensions_published table reference + * Create an aliased + * public.admin_statistics_publishers_by_extensions_published + * table reference */ public AdminStatisticsPublishersByExtensionsPublished(String alias) { this(DSL.name(alias), ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED); } /** - * Create an aliased public.admin_statistics_publishers_by_extensions_published table reference + * Create an aliased + * public.admin_statistics_publishers_by_extensions_published + * table reference */ public AdminStatisticsPublishersByExtensionsPublished(Name alias) { this(alias, ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED); } /** - * Create a public.admin_statistics_publishers_by_extensions_published table reference + * Create a + * public.admin_statistics_publishers_by_extensions_published + * table reference */ public AdminStatisticsPublishersByExtensionsPublished() { this(DSL.name("admin_statistics_publishers_by_extensions_published"), null); @@ -95,16 +109,20 @@ public AdminStatisticsPublishersByExtensionsPublished(Table> getReferences() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED__ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED_FKEY); + return Arrays.asList(Keys.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED__ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED_FKEY); } private transient AdminStatistics _adminStatistics; + /** + * Get the implicit join path to the public.admin_statistics + * table. + */ public AdminStatistics adminStatistics() { if (_adminStatistics == null) _adminStatistics = new AdminStatistics(this, Keys.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED__ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED_FKEY); @@ -122,6 +140,11 @@ public AdminStatisticsPublishersByExtensionsPublished as(Name alias) { return new AdminStatisticsPublishersByExtensionsPublished(alias, this); } + @Override + public AdminStatisticsPublishersByExtensionsPublished as(Table alias) { + return new AdminStatisticsPublishersByExtensionsPublished(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +161,14 @@ public AdminStatisticsPublishersByExtensionsPublished rename(Name name) { return new AdminStatisticsPublishersByExtensionsPublished(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatisticsPublishersByExtensionsPublished rename(Table name) { + return new AdminStatisticsPublishersByExtensionsPublished(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +177,19 @@ public AdminStatisticsPublishersByExtensionsPublished rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostActivePublishingUsers.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostActivePublishingUsers.java index 21dfd2c12..6c6d2d57f 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostActivePublishingUsers.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostActivePublishingUsers.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsTopMostActivePublishingUsersRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -33,7 +37,8 @@ public class AdminStatisticsTopMostActivePublishingUsers extends TableImplpublic.admin_statistics_top_most_active_publishing_users + * The reference instance of + * public.admin_statistics_top_most_active_publishing_users */ public static final AdminStatisticsTopMostActivePublishingUsers ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS = new AdminStatisticsTopMostActivePublishingUsers(); @@ -46,17 +51,20 @@ public Class getRecordType() } /** - * The column public.admin_statistics_top_most_active_publishing_users.admin_statistics_id. + * The column + * public.admin_statistics_top_most_active_publishing_users.admin_statistics_id. */ public final TableField ADMIN_STATISTICS_ID = createField(DSL.name("admin_statistics_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics_top_most_active_publishing_users.login_name. + * The column + * public.admin_statistics_top_most_active_publishing_users.login_name. */ public final TableField LOGIN_NAME = createField(DSL.name("login_name"), SQLDataType.VARCHAR(255).nullable(false), this, ""); /** - * The column public.admin_statistics_top_most_active_publishing_users.extension_version_count. + * The column + * public.admin_statistics_top_most_active_publishing_users.extension_version_count. */ public final TableField EXTENSION_VERSION_COUNT = createField(DSL.name("extension_version_count"), SQLDataType.INTEGER.nullable(false), this, ""); @@ -69,21 +77,27 @@ private AdminStatisticsTopMostActivePublishingUsers(Name alias, Tablepublic.admin_statistics_top_most_active_publishing_users table reference + * Create an aliased + * public.admin_statistics_top_most_active_publishing_users + * table reference */ public AdminStatisticsTopMostActivePublishingUsers(String alias) { this(DSL.name(alias), ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS); } /** - * Create an aliased public.admin_statistics_top_most_active_publishing_users table reference + * Create an aliased + * public.admin_statistics_top_most_active_publishing_users + * table reference */ public AdminStatisticsTopMostActivePublishingUsers(Name alias) { this(alias, ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS); } /** - * Create a public.admin_statistics_top_most_active_publishing_users table reference + * Create a + * public.admin_statistics_top_most_active_publishing_users + * table reference */ public AdminStatisticsTopMostActivePublishingUsers() { this(DSL.name("admin_statistics_top_most_active_publishing_users"), null); @@ -95,16 +109,20 @@ public AdminStatisticsTopMostActivePublishingUsers(Table c @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override public List> getReferences() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS__ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS_FKEY); + return Arrays.asList(Keys.ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS__ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS_FKEY); } private transient AdminStatistics _adminStatistics; + /** + * Get the implicit join path to the public.admin_statistics + * table. + */ public AdminStatistics adminStatistics() { if (_adminStatistics == null) _adminStatistics = new AdminStatistics(this, Keys.ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS__ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS_FKEY); @@ -122,6 +140,11 @@ public AdminStatisticsTopMostActivePublishingUsers as(Name alias) { return new AdminStatisticsTopMostActivePublishingUsers(alias, this); } + @Override + public AdminStatisticsTopMostActivePublishingUsers as(Table alias) { + return new AdminStatisticsTopMostActivePublishingUsers(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +161,14 @@ public AdminStatisticsTopMostActivePublishingUsers rename(Name name) { return new AdminStatisticsTopMostActivePublishingUsers(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatisticsTopMostActivePublishingUsers rename(Table name) { + return new AdminStatisticsTopMostActivePublishingUsers(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +177,19 @@ public AdminStatisticsTopMostActivePublishingUsers rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostDownloadedExtensions.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostDownloadedExtensions.java index d90be33a0..d3f8151bd 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostDownloadedExtensions.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopMostDownloadedExtensions.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsTopMostDownloadedExtensionsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -33,7 +37,8 @@ public class AdminStatisticsTopMostDownloadedExtensions extends TableImplpublic.admin_statistics_top_most_downloaded_extensions + * The reference instance of + * public.admin_statistics_top_most_downloaded_extensions */ public static final AdminStatisticsTopMostDownloadedExtensions ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS = new AdminStatisticsTopMostDownloadedExtensions(); @@ -46,17 +51,20 @@ public Class getRecordType() { } /** - * The column public.admin_statistics_top_most_downloaded_extensions.admin_statistics_id. + * The column + * public.admin_statistics_top_most_downloaded_extensions.admin_statistics_id. */ public final TableField ADMIN_STATISTICS_ID = createField(DSL.name("admin_statistics_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics_top_most_downloaded_extensions.extension_identifier. + * The column + * public.admin_statistics_top_most_downloaded_extensions.extension_identifier. */ public final TableField EXTENSION_IDENTIFIER = createField(DSL.name("extension_identifier"), SQLDataType.VARCHAR(255).nullable(false), this, ""); /** - * The column public.admin_statistics_top_most_downloaded_extensions.downloads. + * The column + * public.admin_statistics_top_most_downloaded_extensions.downloads. */ public final TableField DOWNLOADS = createField(DSL.name("downloads"), SQLDataType.BIGINT.nullable(false), this, ""); @@ -69,21 +77,27 @@ private AdminStatisticsTopMostDownloadedExtensions(Name alias, Tablepublic.admin_statistics_top_most_downloaded_extensions table reference + * Create an aliased + * public.admin_statistics_top_most_downloaded_extensions table + * reference */ public AdminStatisticsTopMostDownloadedExtensions(String alias) { this(DSL.name(alias), ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS); } /** - * Create an aliased public.admin_statistics_top_most_downloaded_extensions table reference + * Create an aliased + * public.admin_statistics_top_most_downloaded_extensions table + * reference */ public AdminStatisticsTopMostDownloadedExtensions(Name alias) { this(alias, ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS); } /** - * Create a public.admin_statistics_top_most_downloaded_extensions table reference + * Create a + * public.admin_statistics_top_most_downloaded_extensions table + * reference */ public AdminStatisticsTopMostDownloadedExtensions() { this(DSL.name("admin_statistics_top_most_downloaded_extensions"), null); @@ -95,16 +109,20 @@ public AdminStatisticsTopMostDownloadedExtensions(Table ch @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override public List> getReferences() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS__ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS_FKEY); + return Arrays.asList(Keys.ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS__ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS_FKEY); } private transient AdminStatistics _adminStatistics; + /** + * Get the implicit join path to the public.admin_statistics + * table. + */ public AdminStatistics adminStatistics() { if (_adminStatistics == null) _adminStatistics = new AdminStatistics(this, Keys.ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS__ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS_FKEY); @@ -122,6 +140,11 @@ public AdminStatisticsTopMostDownloadedExtensions as(Name alias) { return new AdminStatisticsTopMostDownloadedExtensions(alias, this); } + @Override + public AdminStatisticsTopMostDownloadedExtensions as(Table alias) { + return new AdminStatisticsTopMostDownloadedExtensions(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +161,14 @@ public AdminStatisticsTopMostDownloadedExtensions rename(Name name) { return new AdminStatisticsTopMostDownloadedExtensions(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatisticsTopMostDownloadedExtensions rename(Table name) { + return new AdminStatisticsTopMostDownloadedExtensions(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +177,19 @@ public AdminStatisticsTopMostDownloadedExtensions rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensionVersions.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensionVersions.java index 222e90b57..f47d272dc 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensionVersions.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensionVersions.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsTopNamespaceExtensionVersionsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -33,7 +37,8 @@ public class AdminStatisticsTopNamespaceExtensionVersions extends TableImplpublic.admin_statistics_top_namespace_extension_versions + * The reference instance of + * public.admin_statistics_top_namespace_extension_versions */ public static final AdminStatisticsTopNamespaceExtensionVersions ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS = new AdminStatisticsTopNamespaceExtensionVersions(); @@ -46,17 +51,20 @@ public Class getRecordType() } /** - * The column public.admin_statistics_top_namespace_extension_versions.admin_statistics_id. + * The column + * public.admin_statistics_top_namespace_extension_versions.admin_statistics_id. */ public final TableField ADMIN_STATISTICS_ID = createField(DSL.name("admin_statistics_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics_top_namespace_extension_versions.namespace. + * The column + * public.admin_statistics_top_namespace_extension_versions.namespace. */ public final TableField NAMESPACE = createField(DSL.name("namespace"), SQLDataType.VARCHAR(255).nullable(false), this, ""); /** - * The column public.admin_statistics_top_namespace_extension_versions.extension_version_count. + * The column + * public.admin_statistics_top_namespace_extension_versions.extension_version_count. */ public final TableField EXTENSION_VERSION_COUNT = createField(DSL.name("extension_version_count"), SQLDataType.INTEGER.nullable(false), this, ""); @@ -69,21 +77,27 @@ private AdminStatisticsTopNamespaceExtensionVersions(Name alias, Tablepublic.admin_statistics_top_namespace_extension_versions table reference + * Create an aliased + * public.admin_statistics_top_namespace_extension_versions + * table reference */ public AdminStatisticsTopNamespaceExtensionVersions(String alias) { this(DSL.name(alias), ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS); } /** - * Create an aliased public.admin_statistics_top_namespace_extension_versions table reference + * Create an aliased + * public.admin_statistics_top_namespace_extension_versions + * table reference */ public AdminStatisticsTopNamespaceExtensionVersions(Name alias) { this(alias, ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS); } /** - * Create a public.admin_statistics_top_namespace_extension_versions table reference + * Create a + * public.admin_statistics_top_namespace_extension_versions + * table reference */ public AdminStatisticsTopNamespaceExtensionVersions() { this(DSL.name("admin_statistics_top_namespace_extension_versions"), null); @@ -95,16 +109,20 @@ public AdminStatisticsTopNamespaceExtensionVersions(Table @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override public List> getReferences() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS__ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS_FKEY); + return Arrays.asList(Keys.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS__ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS_FKEY); } private transient AdminStatistics _adminStatistics; + /** + * Get the implicit join path to the public.admin_statistics + * table. + */ public AdminStatistics adminStatistics() { if (_adminStatistics == null) _adminStatistics = new AdminStatistics(this, Keys.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS__ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS_FKEY); @@ -122,6 +140,11 @@ public AdminStatisticsTopNamespaceExtensionVersions as(Name alias) { return new AdminStatisticsTopNamespaceExtensionVersions(alias, this); } + @Override + public AdminStatisticsTopNamespaceExtensionVersions as(Table alias) { + return new AdminStatisticsTopNamespaceExtensionVersions(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +161,14 @@ public AdminStatisticsTopNamespaceExtensionVersions rename(Name name) { return new AdminStatisticsTopNamespaceExtensionVersions(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatisticsTopNamespaceExtensionVersions rename(Table name) { + return new AdminStatisticsTopNamespaceExtensionVersions(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +177,19 @@ public AdminStatisticsTopNamespaceExtensionVersions rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensions.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensions.java index ec13bd4ab..98d21abd3 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensions.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AdminStatisticsTopNamespaceExtensions.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AdminStatisticsTopNamespaceExtensionsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -33,7 +37,8 @@ public class AdminStatisticsTopNamespaceExtensions extends TableImplpublic.admin_statistics_top_namespace_extensions + * The reference instance of + * public.admin_statistics_top_namespace_extensions */ public static final AdminStatisticsTopNamespaceExtensions ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS = new AdminStatisticsTopNamespaceExtensions(); @@ -46,17 +51,20 @@ public Class getRecordType() { } /** - * The column public.admin_statistics_top_namespace_extensions.admin_statistics_id. + * The column + * public.admin_statistics_top_namespace_extensions.admin_statistics_id. */ public final TableField ADMIN_STATISTICS_ID = createField(DSL.name("admin_statistics_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.admin_statistics_top_namespace_extensions.namespace. + * The column + * public.admin_statistics_top_namespace_extensions.namespace. */ public final TableField NAMESPACE = createField(DSL.name("namespace"), SQLDataType.VARCHAR(255).nullable(false), this, ""); /** - * The column public.admin_statistics_top_namespace_extensions.extension_count. + * The column + * public.admin_statistics_top_namespace_extensions.extension_count. */ public final TableField EXTENSION_COUNT = createField(DSL.name("extension_count"), SQLDataType.INTEGER.nullable(false), this, ""); @@ -69,21 +77,26 @@ private AdminStatisticsTopNamespaceExtensions(Name alias, Tablepublic.admin_statistics_top_namespace_extensions table reference + * Create an aliased + * public.admin_statistics_top_namespace_extensions table + * reference */ public AdminStatisticsTopNamespaceExtensions(String alias) { this(DSL.name(alias), ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS); } /** - * Create an aliased public.admin_statistics_top_namespace_extensions table reference + * Create an aliased + * public.admin_statistics_top_namespace_extensions table + * reference */ public AdminStatisticsTopNamespaceExtensions(Name alias) { this(alias, ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS); } /** - * Create a public.admin_statistics_top_namespace_extensions table reference + * Create a public.admin_statistics_top_namespace_extensions + * table reference */ public AdminStatisticsTopNamespaceExtensions() { this(DSL.name("admin_statistics_top_namespace_extensions"), null); @@ -95,16 +108,20 @@ public AdminStatisticsTopNamespaceExtensions(Table child, @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override public List> getReferences() { - return Arrays.>asList(Keys.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS__ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS_FKEY); + return Arrays.asList(Keys.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS__ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS_FKEY); } private transient AdminStatistics _adminStatistics; + /** + * Get the implicit join path to the public.admin_statistics + * table. + */ public AdminStatistics adminStatistics() { if (_adminStatistics == null) _adminStatistics = new AdminStatistics(this, Keys.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS__ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS_FKEY); @@ -122,6 +139,11 @@ public AdminStatisticsTopNamespaceExtensions as(Name alias) { return new AdminStatisticsTopNamespaceExtensions(alias, this); } + @Override + public AdminStatisticsTopNamespaceExtensions as(Table alias) { + return new AdminStatisticsTopNamespaceExtensions(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +160,14 @@ public AdminStatisticsTopNamespaceExtensions rename(Name name) { return new AdminStatisticsTopNamespaceExtensions(name, null); } + /** + * Rename this table + */ + @Override + public AdminStatisticsTopNamespaceExtensions rename(Table name) { + return new AdminStatisticsTopNamespaceExtensions(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +176,19 @@ public AdminStatisticsTopNamespaceExtensions rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AzureDownloadCountProcessedItem.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AzureDownloadCountProcessedItem.java index ecc6aeffc..67749cbf9 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AzureDownloadCountProcessedItem.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/AzureDownloadCountProcessedItem.java @@ -5,18 +5,20 @@ import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.AzureDownloadCountProcessedItemRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function5; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row5; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -35,7 +37,8 @@ public class AzureDownloadCountProcessedItem extends TableImplpublic.azure_download_count_processed_item + * The reference instance of + * public.azure_download_count_processed_item */ public static final AzureDownloadCountProcessedItem AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM = new AzureDownloadCountProcessedItem(); @@ -58,17 +61,20 @@ public Class getRecordType() { public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(255).nullable(false), this, ""); /** - * The column public.azure_download_count_processed_item.processed_on. + * The column + * public.azure_download_count_processed_item.processed_on. */ public final TableField PROCESSED_ON = createField(DSL.name("processed_on"), SQLDataType.LOCALDATETIME(6), this, ""); /** - * The column public.azure_download_count_processed_item.execution_time. + * The column + * public.azure_download_count_processed_item.execution_time. */ public final TableField EXECUTION_TIME = createField(DSL.name("execution_time"), SQLDataType.INTEGER, this, ""); /** - * The column public.azure_download_count_processed_item.success. + * The column + * public.azure_download_count_processed_item.success. */ public final TableField SUCCESS = createField(DSL.name("success"), SQLDataType.BOOLEAN.nullable(false), this, ""); @@ -81,21 +87,24 @@ private AzureDownloadCountProcessedItem(Name alias, Tablepublic.azure_download_count_processed_item table reference + * Create an aliased public.azure_download_count_processed_item + * table reference */ public AzureDownloadCountProcessedItem(String alias) { this(DSL.name(alias), AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM); } /** - * Create an aliased public.azure_download_count_processed_item table reference + * Create an aliased public.azure_download_count_processed_item + * table reference */ public AzureDownloadCountProcessedItem(Name alias) { this(alias, AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM); } /** - * Create a public.azure_download_count_processed_item table reference + * Create a public.azure_download_count_processed_item table + * reference */ public AzureDownloadCountProcessedItem() { this(DSL.name("azure_download_count_processed_item"), null); @@ -107,7 +116,7 @@ public AzureDownloadCountProcessedItem(Table child, Foreig @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override @@ -115,11 +124,6 @@ public UniqueKey getPrimaryKey() { return Keys.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.AZURE_DOWNLOAD_COUNT_PROCESSED_ITEM_PKEY); - } - @Override public AzureDownloadCountProcessedItem as(String alias) { return new AzureDownloadCountProcessedItem(DSL.name(alias), this); @@ -130,6 +134,11 @@ public AzureDownloadCountProcessedItem as(Name alias) { return new AzureDownloadCountProcessedItem(alias, this); } + @Override + public AzureDownloadCountProcessedItem as(Table alias) { + return new AzureDownloadCountProcessedItem(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -146,6 +155,14 @@ public AzureDownloadCountProcessedItem rename(Name name) { return new AzureDownloadCountProcessedItem(name, null); } + /** + * Rename this table + */ + @Override + public AzureDownloadCountProcessedItem rename(Table name) { + return new AzureDownloadCountProcessedItem(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row5 type methods // ------------------------------------------------------------------------- @@ -154,4 +171,19 @@ public AzureDownloadCountProcessedItem rename(Name name) { public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function5 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function5 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Download.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Download.java deleted file mode 100644 index 55b29733e..000000000 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Download.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package org.eclipse.openvsx.jooq.tables; - - -import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.openvsx.jooq.Indexes; -import org.eclipse.openvsx.jooq.Keys; -import org.eclipse.openvsx.jooq.Public; -import org.eclipse.openvsx.jooq.tables.records.DownloadRecord; -import org.jooq.Field; -import org.jooq.ForeignKey; -import org.jooq.Index; -import org.jooq.Name; -import org.jooq.Record; -import org.jooq.Row4; -import org.jooq.Schema; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.TableOptions; -import org.jooq.UniqueKey; -import org.jooq.impl.DSL; -import org.jooq.impl.SQLDataType; -import org.jooq.impl.TableImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Download extends TableImpl { - - private static final long serialVersionUID = 1L; - - /** - * The reference instance of public.download - */ - public static final Download DOWNLOAD = new Download(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return DownloadRecord.class; - } - - /** - * The column public.download.id. - */ - public final TableField ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false), this, ""); - - /** - * The column public.download.file_resource_id_not_fk. - */ - public final TableField FILE_RESOURCE_ID_NOT_FK = createField(DSL.name("file_resource_id_not_fk"), SQLDataType.BIGINT.nullable(false), this, ""); - - /** - * The column public.download.timestamp. - */ - public final TableField TIMESTAMP = createField(DSL.name("timestamp"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); - - /** - * The column public.download.amount. - */ - public final TableField AMOUNT = createField(DSL.name("amount"), SQLDataType.INTEGER.nullable(false), this, ""); - - private Download(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private Download(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - /** - * Create an aliased public.download table reference - */ - public Download(String alias) { - this(DSL.name(alias), DOWNLOAD); - } - - /** - * Create an aliased public.download table reference - */ - public Download(Name alias) { - this(alias, DOWNLOAD); - } - - /** - * Create a public.download table reference - */ - public Download() { - this(DSL.name("download"), null); - } - - public Download(Table child, ForeignKey key) { - super(child, key, DOWNLOAD); - } - - @Override - public Schema getSchema() { - return Public.PUBLIC; - } - - @Override - public List getIndexes() { - return Arrays.asList(Indexes.DOWNLOAD_TIMESTAMP_BRIN_IDX); - } - - @Override - public UniqueKey getPrimaryKey() { - return Keys.DOWNLOAD_PKEY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.DOWNLOAD_PKEY); - } - - @Override - public Download as(String alias) { - return new Download(DSL.name(alias), this); - } - - @Override - public Download as(Name alias) { - return new Download(alias, this); - } - - /** - * Rename this table - */ - @Override - public Download rename(String name) { - return new Download(DSL.name(name), null); - } - - /** - * Rename this table - */ - @Override - public Download rename(Name name) { - return new Download(name, null); - } - - // ------------------------------------------------------------------------- - // Row4 type methods - // ------------------------------------------------------------------------- - - @Override - public Row4 fieldsRow() { - return (Row4) super.fieldsRow(); - } -} diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/EntityActiveState.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/EntityActiveState.java deleted file mode 100644 index e80bdb8af..000000000 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/EntityActiveState.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package org.eclipse.openvsx.jooq.tables; - - -import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.openvsx.jooq.Keys; -import org.eclipse.openvsx.jooq.Public; -import org.eclipse.openvsx.jooq.tables.records.EntityActiveStateRecord; -import org.jooq.Field; -import org.jooq.ForeignKey; -import org.jooq.Name; -import org.jooq.Record; -import org.jooq.Row5; -import org.jooq.Schema; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.TableOptions; -import org.jooq.UniqueKey; -import org.jooq.impl.DSL; -import org.jooq.impl.SQLDataType; -import org.jooq.impl.TableImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class EntityActiveState extends TableImpl { - - private static final long serialVersionUID = 1L; - - /** - * The reference instance of public.entity_active_state - */ - public static final EntityActiveState ENTITY_ACTIVE_STATE = new EntityActiveState(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return EntityActiveStateRecord.class; - } - - /** - * The column public.entity_active_state.id. - */ - public final TableField ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false), this, ""); - - /** - * The column public.entity_active_state.entity_id. - */ - public final TableField ENTITY_ID = createField(DSL.name("entity_id"), SQLDataType.BIGINT.nullable(false), this, ""); - - /** - * The column public.entity_active_state.entity_type. - */ - public final TableField ENTITY_TYPE = createField(DSL.name("entity_type"), SQLDataType.VARCHAR(255).nullable(false), this, ""); - - /** - * The column public.entity_active_state.active. - */ - public final TableField ACTIVE = createField(DSL.name("active"), SQLDataType.BOOLEAN.nullable(false), this, ""); - - /** - * The column public.entity_active_state.timestamp. - */ - public final TableField TIMESTAMP = createField(DSL.name("timestamp"), SQLDataType.LOCALDATETIME(6), this, ""); - - private EntityActiveState(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private EntityActiveState(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - /** - * Create an aliased public.entity_active_state table reference - */ - public EntityActiveState(String alias) { - this(DSL.name(alias), ENTITY_ACTIVE_STATE); - } - - /** - * Create an aliased public.entity_active_state table reference - */ - public EntityActiveState(Name alias) { - this(alias, ENTITY_ACTIVE_STATE); - } - - /** - * Create a public.entity_active_state table reference - */ - public EntityActiveState() { - this(DSL.name("entity_active_state"), null); - } - - public EntityActiveState(Table child, ForeignKey key) { - super(child, key, ENTITY_ACTIVE_STATE); - } - - @Override - public Schema getSchema() { - return Public.PUBLIC; - } - - @Override - public UniqueKey getPrimaryKey() { - return Keys.ENTITY_ACTIVE_STATE_PKEY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.ENTITY_ACTIVE_STATE_PKEY); - } - - @Override - public EntityActiveState as(String alias) { - return new EntityActiveState(DSL.name(alias), this); - } - - @Override - public EntityActiveState as(Name alias) { - return new EntityActiveState(alias, this); - } - - /** - * Rename this table - */ - @Override - public EntityActiveState rename(String name) { - return new EntityActiveState(DSL.name(name), null); - } - - /** - * Rename this table - */ - @Override - public EntityActiveState rename(Name name) { - return new EntityActiveState(name, null); - } - - // ------------------------------------------------------------------------- - // Row5 type methods - // ------------------------------------------------------------------------- - - @Override - public Row5 fieldsRow() { - return (Row5) super.fieldsRow(); - } -} diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Extension.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Extension.java index a38fd46b2..059b31ec2 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Extension.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Extension.java @@ -7,6 +7,7 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -14,11 +15,14 @@ import org.eclipse.openvsx.jooq.tables.records.ExtensionRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function10; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row10; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -134,12 +138,12 @@ public Extension(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.EXTENSION__NAMESPACE_ID__IDX); + return Arrays.asList(Indexes.EXTENSION__NAMESPACE_ID__IDX); } @Override @@ -148,17 +152,20 @@ public UniqueKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.EXTENSION_PKEY, Keys.UNIQUE_EXTENSION_PUBLIC_ID); + public List> getUniqueKeys() { + return Arrays.asList(Keys.UNIQUE_EXTENSION_PUBLIC_ID); } @Override public List> getReferences() { - return Arrays.>asList(Keys.EXTENSION__FK64IMD3NRJ67D50TPKJS94NGMN); + return Arrays.asList(Keys.EXTENSION__FK64IMD3NRJ67D50TPKJS94NGMN); } private transient Namespace _namespace; + /** + * Get the implicit join path to the public.namespace table. + */ public Namespace namespace() { if (_namespace == null) _namespace = new Namespace(this, Keys.EXTENSION__FK64IMD3NRJ67D50TPKJS94NGMN); @@ -176,6 +183,11 @@ public Extension as(Name alias) { return new Extension(alias, this); } + @Override + public Extension as(Table alias) { + return new Extension(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -192,6 +204,14 @@ public Extension rename(Name name) { return new Extension(name, null); } + /** + * Rename this table + */ + @Override + public Extension rename(Table name) { + return new Extension(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row10 type methods // ------------------------------------------------------------------------- @@ -200,4 +220,19 @@ public Extension rename(Name name) { public Row10 fieldsRow() { return (Row10) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function10 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function10 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionReview.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionReview.java index b2d4304a8..7aaafabd9 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionReview.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionReview.java @@ -7,6 +7,7 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -14,11 +15,14 @@ import org.eclipse.openvsx.jooq.tables.records.ExtensionReviewRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function8; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row8; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -124,12 +128,12 @@ public ExtensionReview(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.EXTENSION_REVIEW__EXTENSION_ID__IDX, Indexes.EXTENSION_REVIEW__USER_ID__IDX); + return Arrays.asList(Indexes.EXTENSION_REVIEW__EXTENSION_ID__IDX, Indexes.EXTENSION_REVIEW__USER_ID__IDX); } @Override @@ -137,19 +141,17 @@ public UniqueKey getPrimaryKey() { return Keys.EXTENSION_REVIEW_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.EXTENSION_REVIEW_PKEY); - } - @Override public List> getReferences() { - return Arrays.>asList(Keys.EXTENSION_REVIEW__FKGD2DQDC23OGBNOBX8AFJFPNKP, Keys.EXTENSION_REVIEW__FKINJBN9GRK135Y6IK0UT4UJP0W); + return Arrays.asList(Keys.EXTENSION_REVIEW__FKGD2DQDC23OGBNOBX8AFJFPNKP, Keys.EXTENSION_REVIEW__FKINJBN9GRK135Y6IK0UT4UJP0W); } private transient Extension _extension; private transient UserData _userData; + /** + * Get the implicit join path to the public.extension table. + */ public Extension extension() { if (_extension == null) _extension = new Extension(this, Keys.EXTENSION_REVIEW__FKGD2DQDC23OGBNOBX8AFJFPNKP); @@ -157,6 +159,9 @@ public Extension extension() { return _extension; } + /** + * Get the implicit join path to the public.user_data table. + */ public UserData userData() { if (_userData == null) _userData = new UserData(this, Keys.EXTENSION_REVIEW__FKINJBN9GRK135Y6IK0UT4UJP0W); @@ -174,6 +179,11 @@ public ExtensionReview as(Name alias) { return new ExtensionReview(alias, this); } + @Override + public ExtensionReview as(Table alias) { + return new ExtensionReview(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -190,6 +200,14 @@ public ExtensionReview rename(Name name) { return new ExtensionReview(name, null); } + /** + * Rename this table + */ + @Override + public ExtensionReview rename(Table name) { + return new ExtensionReview(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row8 type methods // ------------------------------------------------------------------------- @@ -198,4 +216,19 @@ public ExtensionReview rename(Name name) { public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function8 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function8 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionVersion.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionVersion.java index 512907d94..4a57c0fb3 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionVersion.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/ExtensionVersion.java @@ -219,7 +219,8 @@ public Class getRecordType() { public final TableField SEMVER_BUILD_METADATA = createField(DSL.name("semver_build_metadata"), SQLDataType.VARCHAR, this, ""); /** - * The column public.extension_version.universal_target_platform. + * The column + * public.extension_version.universal_target_platform. */ public final TableField UNIVERSAL_TARGET_PLATFORM = createField(DSL.name("universal_target_platform"), SQLDataType.BOOLEAN, this, ""); @@ -258,12 +259,12 @@ public ExtensionVersion(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.EXTENSION_VERSION__EXTENSION_ID__IDX, Indexes.EXTENSION_VERSION__PUBLISHED_WITH_ID__IDX, Indexes.EXTENSION_VERSION_BY_TARGET_PLATFORM_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_LATEST_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_VERSION_LIST_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_VERSION_MAP_ORDER_BY_IDX); + return Arrays.asList(Indexes.EXTENSION_VERSION__EXTENSION_ID__IDX, Indexes.EXTENSION_VERSION__PUBLISHED_WITH_ID__IDX, Indexes.EXTENSION_VERSION_BY_TARGET_PLATFORM_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_LATEST_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_VERSION_LIST_ORDER_BY_IDX, Indexes.EXTENSION_VERSION_VERSION_MAP_ORDER_BY_IDX); } @Override @@ -272,19 +273,22 @@ public UniqueKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.EXTENSION_VERSION_PKEY, Keys.UNIQUE_EXTENSION_VERSION); + public List> getUniqueKeys() { + return Arrays.asList(Keys.UNIQUE_EXTENSION_VERSION); } @Override public List> getReferences() { - return Arrays.>asList(Keys.EXTENSION_VERSION__FKKHS1EC9S9J08FGICQ9PMWU6BT, Keys.EXTENSION_VERSION__FK70KHJ8PM0VACASUIIAQ0W0R80, Keys.EXTENSION_VERSION__EXTENSION_VERSION_SIGNATURE_KEY_PAIR_FKEY); + return Arrays.asList(Keys.EXTENSION_VERSION__FKKHS1EC9S9J08FGICQ9PMWU6BT, Keys.EXTENSION_VERSION__FK70KHJ8PM0VACASUIIAQ0W0R80, Keys.EXTENSION_VERSION__EXTENSION_VERSION_SIGNATURE_KEY_PAIR_FKEY); } private transient Extension _extension; private transient PersonalAccessToken _personalAccessToken; private transient SignatureKeyPair _signatureKeyPair; + /** + * Get the implicit join path to the public.extension table. + */ public Extension extension() { if (_extension == null) _extension = new Extension(this, Keys.EXTENSION_VERSION__FKKHS1EC9S9J08FGICQ9PMWU6BT); @@ -292,6 +296,10 @@ public Extension extension() { return _extension; } + /** + * Get the implicit join path to the + * public.personal_access_token table. + */ public PersonalAccessToken personalAccessToken() { if (_personalAccessToken == null) _personalAccessToken = new PersonalAccessToken(this, Keys.EXTENSION_VERSION__FK70KHJ8PM0VACASUIIAQ0W0R80); @@ -299,6 +307,10 @@ public PersonalAccessToken personalAccessToken() { return _personalAccessToken; } + /** + * Get the implicit join path to the public.signature_key_pair + * table. + */ public SignatureKeyPair signatureKeyPair() { if (_signatureKeyPair == null) _signatureKeyPair = new SignatureKeyPair(this, Keys.EXTENSION_VERSION__EXTENSION_VERSION_SIGNATURE_KEY_PAIR_FKEY); @@ -316,6 +328,11 @@ public ExtensionVersion as(Name alias) { return new ExtensionVersion(alias, this); } + @Override + public ExtensionVersion as(Table alias) { + return new ExtensionVersion(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -331,4 +348,12 @@ public ExtensionVersion rename(String name) { public ExtensionVersion rename(Name name) { return new ExtensionVersion(name, null); } + + /** + * Rename this table + */ + @Override + public ExtensionVersion rename(Table name) { + return new ExtensionVersion(name.getQualifiedName(), null); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FileResource.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FileResource.java index 9b046f7a4..37860308f 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FileResource.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FileResource.java @@ -6,6 +6,7 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -13,11 +14,14 @@ import org.eclipse.openvsx.jooq.tables.records.FileResourceRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -113,12 +117,12 @@ public FileResource(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.FILE_RESOURCE_EXTENSION_IDX, Indexes.FILE_RESOURCE_TYPE_IDX); + return Arrays.asList(Indexes.FILE_RESOURCE_EXTENSION_IDX, Indexes.FILE_RESOURCE_TYPE_IDX); } @Override @@ -126,18 +130,17 @@ public UniqueKey getPrimaryKey() { return Keys.FILE_RESOURCE_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.FILE_RESOURCE_PKEY); - } - @Override public List> getReferences() { - return Arrays.>asList(Keys.FILE_RESOURCE__FILE_RESOURCE_EXTENSION_FKEY); + return Arrays.asList(Keys.FILE_RESOURCE__FILE_RESOURCE_EXTENSION_FKEY); } private transient ExtensionVersion _extensionVersion; + /** + * Get the implicit join path to the public.extension_version + * table. + */ public ExtensionVersion extensionVersion() { if (_extensionVersion == null) _extensionVersion = new ExtensionVersion(this, Keys.FILE_RESOURCE__FILE_RESOURCE_EXTENSION_FKEY); @@ -155,6 +158,11 @@ public FileResource as(Name alias) { return new FileResource(alias, this); } + @Override + public FileResource as(Table alias) { + return new FileResource(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -171,6 +179,14 @@ public FileResource rename(Name name) { return new FileResource(name, null); } + /** + * Rename this table + */ + @Override + public FileResource rename(Table name) { + return new FileResource(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -179,4 +195,19 @@ public FileResource rename(Name name) { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FlywaySchemaHistory.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FlywaySchemaHistory.java index ece3fa018..1ec65c0c1 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FlywaySchemaHistory.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/FlywaySchemaHistory.java @@ -7,6 +7,7 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -14,11 +15,14 @@ import org.eclipse.openvsx.jooq.tables.records.FlywaySchemaHistoryRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function10; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row10; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -87,7 +91,7 @@ public Class getRecordType() { /** * The column public.flyway_schema_history.installed_on. */ - public final TableField INSTALLED_ON = createField(DSL.name("installed_on"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField INSTALLED_ON = createField(DSL.name("installed_on"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column public.flyway_schema_history.execution_time. @@ -108,14 +112,16 @@ private FlywaySchemaHistory(Name alias, Table aliased } /** - * Create an aliased public.flyway_schema_history table reference + * Create an aliased public.flyway_schema_history table + * reference */ public FlywaySchemaHistory(String alias) { this(DSL.name(alias), FLYWAY_SCHEMA_HISTORY); } /** - * Create an aliased public.flyway_schema_history table reference + * Create an aliased public.flyway_schema_history table + * reference */ public FlywaySchemaHistory(Name alias) { this(alias, FLYWAY_SCHEMA_HISTORY); @@ -134,12 +140,12 @@ public FlywaySchemaHistory(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.FLYWAY_SCHEMA_HISTORY_S_IDX); + return Arrays.asList(Indexes.FLYWAY_SCHEMA_HISTORY_S_IDX); } @Override @@ -147,11 +153,6 @@ public UniqueKey getPrimaryKey() { return Keys.FLYWAY_SCHEMA_HISTORY_PK; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.FLYWAY_SCHEMA_HISTORY_PK); - } - @Override public FlywaySchemaHistory as(String alias) { return new FlywaySchemaHistory(DSL.name(alias), this); @@ -162,6 +163,11 @@ public FlywaySchemaHistory as(Name alias) { return new FlywaySchemaHistory(alias, this); } + @Override + public FlywaySchemaHistory as(Table alias) { + return new FlywaySchemaHistory(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -178,6 +184,14 @@ public FlywaySchemaHistory rename(Name name) { return new FlywaySchemaHistory(name, null); } + /** + * Rename this table + */ + @Override + public FlywaySchemaHistory rename(Table name) { + return new FlywaySchemaHistory(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row10 type methods // ------------------------------------------------------------------------- @@ -186,4 +200,19 @@ public FlywaySchemaHistory rename(Name name) { public Row10 fieldsRow() { return (Row10) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function10 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function10 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrBackgroundjobservers.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrBackgroundjobservers.java index da060d814..0ccbcee2f 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrBackgroundjobservers.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrBackgroundjobservers.java @@ -8,6 +8,7 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -15,11 +16,14 @@ import org.eclipse.openvsx.jooq.tables.records.JobrunrBackgroundjobserversRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function16; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; -import org.jooq.Row15; +import org.jooq.Records; +import org.jooq.Row16; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -38,7 +42,8 @@ public class JobrunrBackgroundjobservers extends TableImplpublic.jobrunr_backgroundjobservers + * The reference instance of + * public.jobrunr_backgroundjobservers */ public static final JobrunrBackgroundjobservers JOBRUNR_BACKGROUNDJOBSERVERS = new JobrunrBackgroundjobservers(); @@ -56,22 +61,26 @@ public Class getRecordType() { public final TableField ID = createField(DSL.name("id"), SQLDataType.CHAR(36).nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.workerpoolsize. + * The column + * public.jobrunr_backgroundjobservers.workerpoolsize. */ public final TableField WORKERPOOLSIZE = createField(DSL.name("workerpoolsize"), SQLDataType.INTEGER.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.pollintervalinseconds. + * The column + * public.jobrunr_backgroundjobservers.pollintervalinseconds. */ public final TableField POLLINTERVALINSECONDS = createField(DSL.name("pollintervalinseconds"), SQLDataType.INTEGER.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.firstheartbeat. + * The column + * public.jobrunr_backgroundjobservers.firstheartbeat. */ public final TableField FIRSTHEARTBEAT = createField(DSL.name("firstheartbeat"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.lastheartbeat. + * The column + * public.jobrunr_backgroundjobservers.lastheartbeat. */ public final TableField LASTHEARTBEAT = createField(DSL.name("lastheartbeat"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); @@ -81,50 +90,64 @@ public Class getRecordType() { public final TableField RUNNING = createField(DSL.name("running"), SQLDataType.INTEGER.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.systemtotalmemory. + * The column + * public.jobrunr_backgroundjobservers.systemtotalmemory. */ public final TableField SYSTEMTOTALMEMORY = createField(DSL.name("systemtotalmemory"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.systemfreememory. + * The column + * public.jobrunr_backgroundjobservers.systemfreememory. */ public final TableField SYSTEMFREEMEMORY = createField(DSL.name("systemfreememory"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.systemcpuload. + * The column + * public.jobrunr_backgroundjobservers.systemcpuload. */ public final TableField SYSTEMCPULOAD = createField(DSL.name("systemcpuload"), SQLDataType.NUMERIC(3, 2).nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.processmaxmemory. + * The column + * public.jobrunr_backgroundjobservers.processmaxmemory. */ public final TableField PROCESSMAXMEMORY = createField(DSL.name("processmaxmemory"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.processfreememory. + * The column + * public.jobrunr_backgroundjobservers.processfreememory. */ public final TableField PROCESSFREEMEMORY = createField(DSL.name("processfreememory"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.processallocatedmemory. + * The column + * public.jobrunr_backgroundjobservers.processallocatedmemory. */ public final TableField PROCESSALLOCATEDMEMORY = createField(DSL.name("processallocatedmemory"), SQLDataType.BIGINT.nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.processcpuload. + * The column + * public.jobrunr_backgroundjobservers.processcpuload. */ public final TableField PROCESSCPULOAD = createField(DSL.name("processcpuload"), SQLDataType.NUMERIC(3, 2).nullable(false), this, ""); /** - * The column public.jobrunr_backgroundjobservers.deletesucceededjobsafter. + * The column + * public.jobrunr_backgroundjobservers.deletesucceededjobsafter. */ public final TableField DELETESUCCEEDEDJOBSAFTER = createField(DSL.name("deletesucceededjobsafter"), SQLDataType.VARCHAR(32), this, ""); /** - * The column public.jobrunr_backgroundjobservers.permanentlydeletejobsafter. + * The column + * public.jobrunr_backgroundjobservers.permanentlydeletejobsafter. */ public final TableField PERMANENTLYDELETEJOBSAFTER = createField(DSL.name("permanentlydeletejobsafter"), SQLDataType.VARCHAR(32), this, ""); + /** + * The column public.jobrunr_backgroundjobservers.name. + */ + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(128), this, ""); + private JobrunrBackgroundjobservers(Name alias, Table aliased) { this(alias, aliased, null); } @@ -134,14 +157,16 @@ private JobrunrBackgroundjobservers(Name alias, Tablepublic.jobrunr_backgroundjobservers table reference + * Create an aliased public.jobrunr_backgroundjobservers table + * reference */ public JobrunrBackgroundjobservers(String alias) { this(DSL.name(alias), JOBRUNR_BACKGROUNDJOBSERVERS); } /** - * Create an aliased public.jobrunr_backgroundjobservers table reference + * Create an aliased public.jobrunr_backgroundjobservers table + * reference */ public JobrunrBackgroundjobservers(Name alias) { this(alias, JOBRUNR_BACKGROUNDJOBSERVERS); @@ -160,12 +185,12 @@ public JobrunrBackgroundjobservers(Table child, ForeignKey @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override public List getIndexes() { - return Arrays.asList(Indexes.JOBRUNR_BGJOBSRVRS_FSTHB_IDX, Indexes.JOBRUNR_BGJOBSRVRS_LSTHB_IDX); + return Arrays.asList(Indexes.JOBRUNR_BGJOBSRVRS_FSTHB_IDX, Indexes.JOBRUNR_BGJOBSRVRS_LSTHB_IDX); } @Override @@ -173,11 +198,6 @@ public UniqueKey getPrimaryKey() { return Keys.JOBRUNR_BACKGROUNDJOBSERVERS_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.JOBRUNR_BACKGROUNDJOBSERVERS_PKEY); - } - @Override public JobrunrBackgroundjobservers as(String alias) { return new JobrunrBackgroundjobservers(DSL.name(alias), this); @@ -188,6 +208,11 @@ public JobrunrBackgroundjobservers as(Name alias) { return new JobrunrBackgroundjobservers(alias, this); } + @Override + public JobrunrBackgroundjobservers as(Table alias) { + return new JobrunrBackgroundjobservers(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -204,12 +229,35 @@ public JobrunrBackgroundjobservers rename(Name name) { return new JobrunrBackgroundjobservers(name, null); } + /** + * Rename this table + */ + @Override + public JobrunrBackgroundjobservers rename(Table name) { + return new JobrunrBackgroundjobservers(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- - // Row15 type methods + // Row16 type methods // ------------------------------------------------------------------------- @Override - public Row15 fieldsRow() { - return (Row15) super.fieldsRow(); + public Row16 fieldsRow() { + return (Row16) super.fieldsRow(); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function16 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function16 from) { + return convertFrom(toType, Records.mapping(from)); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobs.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobs.java index 058b41270..e5950fa75 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobs.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobs.java @@ -7,6 +7,7 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -14,11 +15,14 @@ import org.eclipse.openvsx.jooq.tables.records.JobrunrJobsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function9; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row9; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -129,12 +133,12 @@ public JobrunrJobs(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.JOBRUNR_JOB_CREATED_AT_IDX, Indexes.JOBRUNR_JOB_RCI_IDX, Indexes.JOBRUNR_JOB_SCHEDULED_AT_IDX, Indexes.JOBRUNR_JOB_SIGNATURE_IDX, Indexes.JOBRUNR_JOB_UPDATED_AT_IDX, Indexes.JOBRUNR_STATE_IDX); + return Arrays.asList(Indexes.JOBRUNR_JOB_CREATED_AT_IDX, Indexes.JOBRUNR_JOB_RCI_IDX, Indexes.JOBRUNR_JOB_SCHEDULED_AT_IDX, Indexes.JOBRUNR_JOB_SIGNATURE_IDX, Indexes.JOBRUNR_JOBS_STATE_UPDATED_IDX, Indexes.JOBRUNR_STATE_IDX); } @Override @@ -142,11 +146,6 @@ public UniqueKey getPrimaryKey() { return Keys.JOBRUNR_JOBS_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.JOBRUNR_JOBS_PKEY); - } - @Override public JobrunrJobs as(String alias) { return new JobrunrJobs(DSL.name(alias), this); @@ -157,6 +156,11 @@ public JobrunrJobs as(Name alias) { return new JobrunrJobs(alias, this); } + @Override + public JobrunrJobs as(Table alias) { + return new JobrunrJobs(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -173,6 +177,14 @@ public JobrunrJobs rename(Name name) { return new JobrunrJobs(name, null); } + /** + * Rename this table + */ + @Override + public JobrunrJobs rename(Table name) { + return new JobrunrJobs(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row9 type methods // ------------------------------------------------------------------------- @@ -181,4 +193,19 @@ public JobrunrJobs rename(Name name) { public Row9 fieldsRow() { return (Row9) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function9 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function9 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobsStats.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobsStats.java index fa6c85e0b..47b0387ec 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobsStats.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrJobsStats.java @@ -4,14 +4,20 @@ package org.eclipse.openvsx.jooq.tables; +import java.math.BigDecimal; +import java.util.function.Function; + import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.JobrunrJobsStatsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function10; import org.jooq.Name; import org.jooq.Record; -import org.jooq.Row11; +import org.jooq.Records; +import org.jooq.Row10; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -46,11 +52,6 @@ public Class getRecordType() { */ public final TableField TOTAL = createField(DSL.name("total"), SQLDataType.BIGINT, this, ""); - /** - * The column public.jobrunr_jobs_stats.awaiting. - */ - public final TableField AWAITING = createField(DSL.name("awaiting"), SQLDataType.BIGINT, this, ""); - /** * The column public.jobrunr_jobs_stats.scheduled. */ @@ -79,7 +80,7 @@ public Class getRecordType() { /** * The column public.jobrunr_jobs_stats.alltimesucceeded. */ - public final TableField ALLTIMESUCCEEDED = createField(DSL.name("alltimesucceeded"), SQLDataType.BIGINT, this, ""); + public final TableField ALLTIMESUCCEEDED = createField(DSL.name("alltimesucceeded"), SQLDataType.NUMERIC, this, ""); /** * The column public.jobrunr_jobs_stats.deleted. @@ -87,7 +88,8 @@ public Class getRecordType() { public final TableField DELETED = createField(DSL.name("deleted"), SQLDataType.BIGINT, this, ""); /** - * The column public.jobrunr_jobs_stats.nbrofbackgroundjobservers. + * The column + * public.jobrunr_jobs_stats.nbrofbackgroundjobservers. */ public final TableField NBROFBACKGROUNDJOBSERVERS = createField(DSL.name("nbrofbackgroundjobservers"), SQLDataType.BIGINT, this, ""); @@ -101,7 +103,42 @@ private JobrunrJobsStats(Name alias, Table aliased) { } private JobrunrJobsStats(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("create view \"jobrunr_jobs_stats\" as SELECT count(*) AS total,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'AWAITING'::text)) AS awaiting,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'SCHEDULED'::text)) AS scheduled,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'ENQUEUED'::text)) AS enqueued,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'PROCESSING'::text)) AS processing,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'FAILED'::text)) AS failed,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'SUCCEEDED'::text)) AS succeeded,\n ( SELECT ((jm.value)::character(10))::numeric(10,0) AS value\n FROM jobrunr_metadata jm\n WHERE ((jm.id)::text = 'succeeded-jobs-counter-cluster'::text)) AS alltimesucceeded,\n ( SELECT count(*) AS count\n FROM jobrunr_jobs jobs\n WHERE ((jobs.state)::text = 'DELETED'::text)) AS deleted,\n ( SELECT count(*) AS count\n FROM jobrunr_backgroundjobservers) AS nbrofbackgroundjobservers,\n ( SELECT count(*) AS count\n FROM jobrunr_recurring_jobs) AS nbrofrecurringjobs\n FROM jobrunr_jobs j;")); + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" + create view "jobrunr_jobs_stats" as WITH job_stat_results AS ( + SELECT jobrunr_jobs.state, + count(*) AS count + FROM jobrunr_jobs + GROUP BY ROLLUP(jobrunr_jobs.state) + ) + SELECT COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE (job_stat_results.state IS NULL)), (0)::bigint) AS total, + COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE ((job_stat_results.state)::text = 'SCHEDULED'::text)), (0)::bigint) AS scheduled, + COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE ((job_stat_results.state)::text = 'ENQUEUED'::text)), (0)::bigint) AS enqueued, + COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE ((job_stat_results.state)::text = 'PROCESSING'::text)), (0)::bigint) AS processing, + COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE ((job_stat_results.state)::text = 'FAILED'::text)), (0)::bigint) AS failed, + COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE ((job_stat_results.state)::text = 'SUCCEEDED'::text)), (0)::bigint) AS succeeded, + COALESCE(( SELECT ((jm.value)::character(10))::numeric(10,0) AS value + FROM jobrunr_metadata jm + WHERE ((jm.id)::text = 'succeeded-jobs-counter-cluster'::text)), (0)::numeric) AS alltimesucceeded, + COALESCE(( SELECT job_stat_results.count + FROM job_stat_results + WHERE ((job_stat_results.state)::text = 'DELETED'::text)), (0)::bigint) AS deleted, + ( SELECT count(*) AS count + FROM jobrunr_backgroundjobservers) AS nbrofbackgroundjobservers, + ( SELECT count(*) AS count + FROM jobrunr_recurring_jobs) AS nbrofrecurringjobs; + """)); } /** @@ -131,7 +168,7 @@ public JobrunrJobsStats(Table child, ForeignKey alias) { + return new JobrunrJobsStats(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -160,12 +202,35 @@ public JobrunrJobsStats rename(Name name) { return new JobrunrJobsStats(name, null); } + /** + * Rename this table + */ + @Override + public JobrunrJobsStats rename(Table name) { + return new JobrunrJobsStats(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- - // Row11 type methods + // Row10 type methods // ------------------------------------------------------------------------- @Override - public Row11 fieldsRow() { - return (Row11) super.fieldsRow(); + public Row10 fieldsRow() { + return (Row10) super.fieldsRow(); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function10 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function10 from) { + return convertFrom(toType, Records.mapping(from)); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMetadata.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMetadata.java index 71f325d35..cd01f7c2d 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMetadata.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMetadata.java @@ -5,18 +5,20 @@ import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.JobrunrMetadataRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -112,7 +114,7 @@ public JobrunrMetadata(Table child, ForeignKey getPrimaryKey() { return Keys.JOBRUNR_METADATA_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.JOBRUNR_METADATA_PKEY); - } - @Override public JobrunrMetadata as(String alias) { return new JobrunrMetadata(DSL.name(alias), this); @@ -135,6 +132,11 @@ public JobrunrMetadata as(Name alias) { return new JobrunrMetadata(alias, this); } + @Override + public JobrunrMetadata as(Table alias) { + return new JobrunrMetadata(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -151,6 +153,14 @@ public JobrunrMetadata rename(Name name) { return new JobrunrMetadata(name, null); } + /** + * Rename this table + */ + @Override + public JobrunrMetadata rename(Table name) { + return new JobrunrMetadata(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -159,4 +169,19 @@ public JobrunrMetadata rename(Name name) { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMigrations.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMigrations.java index ca0fcee43..46c91088d 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMigrations.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrMigrations.java @@ -4,18 +4,20 @@ package org.eclipse.openvsx.jooq.tables; -import java.util.Arrays; -import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.JobrunrMigrationsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -96,7 +98,7 @@ public JobrunrMigrations(Table child, ForeignKey getPrimaryKey() { return Keys.JOBRUNR_MIGRATIONS_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.JOBRUNR_MIGRATIONS_PKEY); - } - @Override public JobrunrMigrations as(String alias) { return new JobrunrMigrations(DSL.name(alias), this); @@ -119,6 +116,11 @@ public JobrunrMigrations as(Name alias) { return new JobrunrMigrations(alias, this); } + @Override + public JobrunrMigrations as(Table alias) { + return new JobrunrMigrations(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -135,6 +137,14 @@ public JobrunrMigrations rename(Name name) { return new JobrunrMigrations(name, null); } + /** + * Rename this table + */ + @Override + public JobrunrMigrations rename(Table name) { + return new JobrunrMigrations(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -143,4 +153,19 @@ public JobrunrMigrations rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrRecurringJobs.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrRecurringJobs.java index 0298c040a..0fc9bf583 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrRecurringJobs.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/JobrunrRecurringJobs.java @@ -6,16 +6,22 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; +import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.JobrunrRecurringJobsRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; +import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; -import org.jooq.Row3; +import org.jooq.Records; +import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -61,6 +67,11 @@ public Class getRecordType() { */ public final TableField JOBASJSON = createField(DSL.name("jobasjson"), SQLDataType.CLOB.nullable(false), this, ""); + /** + * The column public.jobrunr_recurring_jobs.createdat. + */ + public final TableField CREATEDAT = createField(DSL.name("createdat"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("'0'::bigint"), SQLDataType.BIGINT)), this, ""); + private JobrunrRecurringJobs(Name alias, Table aliased) { this(alias, aliased, null); } @@ -70,14 +81,16 @@ private JobrunrRecurringJobs(Name alias, Table alias } /** - * Create an aliased public.jobrunr_recurring_jobs table reference + * Create an aliased public.jobrunr_recurring_jobs table + * reference */ public JobrunrRecurringJobs(String alias) { this(DSL.name(alias), JOBRUNR_RECURRING_JOBS); } /** - * Create an aliased public.jobrunr_recurring_jobs table reference + * Create an aliased public.jobrunr_recurring_jobs table + * reference */ public JobrunrRecurringJobs(Name alias) { this(alias, JOBRUNR_RECURRING_JOBS); @@ -96,17 +109,17 @@ public JobrunrRecurringJobs(Table child, ForeignKey getPrimaryKey() { - return Keys.JOBRUNR_RECURRING_JOBS_PKEY; + public List getIndexes() { + return Arrays.asList(Indexes.JOBRUNR_RECURRING_JOB_CREATED_AT_IDX); } @Override - public List> getKeys() { - return Arrays.>asList(Keys.JOBRUNR_RECURRING_JOBS_PKEY); + public UniqueKey getPrimaryKey() { + return Keys.JOBRUNR_RECURRING_JOBS_PKEY; } @Override @@ -119,6 +132,11 @@ public JobrunrRecurringJobs as(Name alias) { return new JobrunrRecurringJobs(alias, this); } + @Override + public JobrunrRecurringJobs as(Table alias) { + return new JobrunrRecurringJobs(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -135,12 +153,35 @@ public JobrunrRecurringJobs rename(Name name) { return new JobrunrRecurringJobs(name, null); } + /** + * Rename this table + */ + @Override + public JobrunrRecurringJobs rename(Table name) { + return new JobrunrRecurringJobs(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- - // Row3 type methods + // Row4 type methods // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { - return (Row3) super.fieldsRow(); + public Row4 fieldsRow() { + return (Row4) super.fieldsRow(); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/MigrationItem.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/MigrationItem.java index e8f4bd6c1..03cef4190 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/MigrationItem.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/MigrationItem.java @@ -4,18 +4,20 @@ package org.eclipse.openvsx.jooq.tables; -import java.util.Arrays; -import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.MigrationItemRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -101,7 +103,7 @@ public MigrationItem(Table child, ForeignKey getPrimaryKey() { return Keys.MIGRATION_ITEM_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.MIGRATION_ITEM_PKEY); - } - @Override public MigrationItem as(String alias) { return new MigrationItem(DSL.name(alias), this); @@ -124,6 +121,11 @@ public MigrationItem as(Name alias) { return new MigrationItem(alias, this); } + @Override + public MigrationItem as(Table alias) { + return new MigrationItem(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -140,6 +142,14 @@ public MigrationItem rename(Name name) { return new MigrationItem(name, null); } + /** + * Rename this table + */ + @Override + public MigrationItem rename(Table name) { + return new MigrationItem(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -148,4 +158,19 @@ public MigrationItem rename(Name name) { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Namespace.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Namespace.java index fd6bf85f4..290513d4f 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Namespace.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Namespace.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.NamespaceRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function10; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row10; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -131,7 +135,7 @@ public Namespace(Table child, ForeignKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.NAMESPACE_PKEY, Keys.UNIQUE_NAMESPACE_PUBLIC_ID); + public List> getUniqueKeys() { + return Arrays.asList(Keys.UNIQUE_NAMESPACE_PUBLIC_ID); } @Override @@ -154,6 +158,11 @@ public Namespace as(Name alias) { return new Namespace(alias, this); } + @Override + public Namespace as(Table alias) { + return new Namespace(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -170,6 +179,14 @@ public Namespace rename(Name name) { return new Namespace(name, null); } + /** + * Rename this table + */ + @Override + public Namespace rename(Table name) { + return new Namespace(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row10 type methods // ------------------------------------------------------------------------- @@ -178,4 +195,19 @@ public Namespace rename(Name name) { public Row10 fieldsRow() { return (Row10) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function10 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function10 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceMembership.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceMembership.java index af323e774..dde1dd9cf 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceMembership.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceMembership.java @@ -6,6 +6,7 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -13,11 +14,14 @@ import org.eclipse.openvsx.jooq.tables.records.NamespaceMembershipRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -77,14 +81,16 @@ private NamespaceMembership(Name alias, Table aliased } /** - * Create an aliased public.namespace_membership table reference + * Create an aliased public.namespace_membership table + * reference */ public NamespaceMembership(String alias) { this(DSL.name(alias), NAMESPACE_MEMBERSHIP); } /** - * Create an aliased public.namespace_membership table reference + * Create an aliased public.namespace_membership table + * reference */ public NamespaceMembership(Name alias) { this(alias, NAMESPACE_MEMBERSHIP); @@ -103,12 +109,12 @@ public NamespaceMembership(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.NAMESPACE_MEMBERSHIP__NAMESPACE__IDX, Indexes.NAMESPACE_MEMBERSHIP__USER_DATA__IDX); + return Arrays.asList(Indexes.NAMESPACE_MEMBERSHIP__NAMESPACE__IDX, Indexes.NAMESPACE_MEMBERSHIP__USER_DATA__IDX); } @Override @@ -117,18 +123,21 @@ public UniqueKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.NAMESPACE_MEMBERSHIP_PKEY); + public List> getUniqueKeys() { + return Arrays.asList(Keys.UNIQUE_NAMESPACE_MEMBERSHIP); } @Override public List> getReferences() { - return Arrays.>asList(Keys.NAMESPACE_MEMBERSHIP__FKGFHWHKNULA6DO2N6WYVQETM3N, Keys.NAMESPACE_MEMBERSHIP__FKNSAMEKUTXYWVSB3S1MJDCJKYP); + return Arrays.asList(Keys.NAMESPACE_MEMBERSHIP__FKGFHWHKNULA6DO2N6WYVQETM3N, Keys.NAMESPACE_MEMBERSHIP__FKNSAMEKUTXYWVSB3S1MJDCJKYP); } private transient Namespace _namespace; private transient UserData _userData; + /** + * Get the implicit join path to the public.namespace table. + */ public Namespace namespace() { if (_namespace == null) _namespace = new Namespace(this, Keys.NAMESPACE_MEMBERSHIP__FKGFHWHKNULA6DO2N6WYVQETM3N); @@ -136,6 +145,9 @@ public Namespace namespace() { return _namespace; } + /** + * Get the implicit join path to the public.user_data table. + */ public UserData userData() { if (_userData == null) _userData = new UserData(this, Keys.NAMESPACE_MEMBERSHIP__FKNSAMEKUTXYWVSB3S1MJDCJKYP); @@ -153,6 +165,11 @@ public NamespaceMembership as(Name alias) { return new NamespaceMembership(alias, this); } + @Override + public NamespaceMembership as(Table alias) { + return new NamespaceMembership(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -169,6 +186,14 @@ public NamespaceMembership rename(Name name) { return new NamespaceMembership(name, null); } + /** + * Rename this table + */ + @Override + public NamespaceMembership rename(Table name) { + return new NamespaceMembership(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -177,4 +202,19 @@ public NamespaceMembership rename(Name name) { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceSocialLinks.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceSocialLinks.java index 506c95b8b..5d7cc703a 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceSocialLinks.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/NamespaceSocialLinks.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.NamespaceSocialLinksRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -69,14 +73,16 @@ private NamespaceSocialLinks(Name alias, Table alias } /** - * Create an aliased public.namespace_social_links table reference + * Create an aliased public.namespace_social_links table + * reference */ public NamespaceSocialLinks(String alias) { this(DSL.name(alias), NAMESPACE_SOCIAL_LINKS); } /** - * Create an aliased public.namespace_social_links table reference + * Create an aliased public.namespace_social_links table + * reference */ public NamespaceSocialLinks(Name alias) { this(alias, NAMESPACE_SOCIAL_LINKS); @@ -95,16 +101,19 @@ public NamespaceSocialLinks(Table child, ForeignKey> getReferences() { - return Arrays.>asList(Keys.NAMESPACE_SOCIAL_LINKS__NAMESPACE_SOCIAL_LINKS_FKEY); + return Arrays.asList(Keys.NAMESPACE_SOCIAL_LINKS__NAMESPACE_SOCIAL_LINKS_FKEY); } private transient Namespace _namespace; + /** + * Get the implicit join path to the public.namespace table. + */ public Namespace namespace() { if (_namespace == null) _namespace = new Namespace(this, Keys.NAMESPACE_SOCIAL_LINKS__NAMESPACE_SOCIAL_LINKS_FKEY); @@ -122,6 +131,11 @@ public NamespaceSocialLinks as(Name alias) { return new NamespaceSocialLinks(alias, this); } + @Override + public NamespaceSocialLinks as(Table alias) { + return new NamespaceSocialLinks(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +152,14 @@ public NamespaceSocialLinks rename(Name name) { return new NamespaceSocialLinks(name, null); } + /** + * Rename this table + */ + @Override + public NamespaceSocialLinks rename(Table name) { + return new NamespaceSocialLinks(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -146,4 +168,19 @@ public NamespaceSocialLinks rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersistedLog.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersistedLog.java index 015e4f6d5..818b7bdcf 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersistedLog.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersistedLog.java @@ -7,6 +7,7 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -14,11 +15,14 @@ import org.eclipse.openvsx.jooq.tables.records.PersistedLogRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -104,12 +108,12 @@ public PersistedLog(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.PERSISTED_LOG__USER_DATA__IDX); + return Arrays.asList(Indexes.PERSISTED_LOG__USER_DATA__IDX); } @Override @@ -117,18 +121,16 @@ public UniqueKey getPrimaryKey() { return Keys.PERSISTED_LOG_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.PERSISTED_LOG_PKEY); - } - @Override public List> getReferences() { - return Arrays.>asList(Keys.PERSISTED_LOG__PERSISTED_LOG_USER_DATA_FKEY); + return Arrays.asList(Keys.PERSISTED_LOG__PERSISTED_LOG_USER_DATA_FKEY); } private transient UserData _userData; + /** + * Get the implicit join path to the public.user_data table. + */ public UserData userData() { if (_userData == null) _userData = new UserData(this, Keys.PERSISTED_LOG__PERSISTED_LOG_USER_DATA_FKEY); @@ -146,6 +148,11 @@ public PersistedLog as(Name alias) { return new PersistedLog(alias, this); } + @Override + public PersistedLog as(Table alias) { + return new PersistedLog(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -162,6 +169,14 @@ public PersistedLog rename(Name name) { return new PersistedLog(name, null); } + /** + * Rename this table + */ + @Override + public PersistedLog rename(Table name) { + return new PersistedLog(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -170,4 +185,19 @@ public PersistedLog rename(Name name) { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersonalAccessToken.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersonalAccessToken.java index 5f91c0acc..28814a27d 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersonalAccessToken.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/PersonalAccessToken.java @@ -7,16 +7,20 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.PersonalAccessTokenRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function7; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row7; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -91,14 +95,16 @@ private PersonalAccessToken(Name alias, Table aliased } /** - * Create an aliased public.personal_access_token table reference + * Create an aliased public.personal_access_token table + * reference */ public PersonalAccessToken(String alias) { this(DSL.name(alias), PERSONAL_ACCESS_TOKEN); } /** - * Create an aliased public.personal_access_token table reference + * Create an aliased public.personal_access_token table + * reference */ public PersonalAccessToken(Name alias) { this(alias, PERSONAL_ACCESS_TOKEN); @@ -117,7 +123,7 @@ public PersonalAccessToken(Table child, ForeignKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.PERSONAL_ACCESS_TOKEN_PKEY, Keys.UKJEUD5MSSQBQKID58RD2K1INOF); + public List> getUniqueKeys() { + return Arrays.asList(Keys.UKJEUD5MSSQBQKID58RD2K1INOF); } @Override public List> getReferences() { - return Arrays.>asList(Keys.PERSONAL_ACCESS_TOKEN__FKTQJVMHOIG3WTTJ6DL1IBCAJ3L); + return Arrays.asList(Keys.PERSONAL_ACCESS_TOKEN__FKTQJVMHOIG3WTTJ6DL1IBCAJ3L); } private transient UserData _userData; + /** + * Get the implicit join path to the public.user_data table. + */ public UserData userData() { if (_userData == null) _userData = new UserData(this, Keys.PERSONAL_ACCESS_TOKEN__FKTQJVMHOIG3WTTJ6DL1IBCAJ3L); @@ -154,6 +163,11 @@ public PersonalAccessToken as(Name alias) { return new PersonalAccessToken(alias, this); } + @Override + public PersonalAccessToken as(Table alias) { + return new PersonalAccessToken(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -170,6 +184,14 @@ public PersonalAccessToken rename(Name name) { return new PersonalAccessToken(name, null); } + /** + * Rename this table + */ + @Override + public PersonalAccessToken rename(Table name) { + return new PersonalAccessToken(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row7 type methods // ------------------------------------------------------------------------- @@ -178,4 +200,19 @@ public PersonalAccessToken rename(Name name) { public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function7 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function7 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Shedlock.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Shedlock.java index e87d1928c..a72742072 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Shedlock.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/Shedlock.java @@ -5,18 +5,20 @@ import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.ShedlockRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -102,7 +104,7 @@ public Shedlock(Table child, ForeignKey @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override @@ -110,11 +112,6 @@ public UniqueKey getPrimaryKey() { return Keys.SHEDLOCK_PKEY; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.SHEDLOCK_PKEY); - } - @Override public Shedlock as(String alias) { return new Shedlock(DSL.name(alias), this); @@ -125,6 +122,11 @@ public Shedlock as(Name alias) { return new Shedlock(alias, this); } + @Override + public Shedlock as(Table alias) { + return new Shedlock(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -141,6 +143,14 @@ public Shedlock rename(Name name) { return new Shedlock(name, null); } + /** + * Rename this table + */ + @Override + public Shedlock rename(Table name) { + return new Shedlock(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -149,4 +159,19 @@ public Shedlock rename(Name name) { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SignatureKeyPair.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SignatureKeyPair.java index d20d2ed0b..f98d58d02 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SignatureKeyPair.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SignatureKeyPair.java @@ -7,16 +7,20 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.SignatureKeyPairRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -112,7 +116,7 @@ public SignatureKeyPair(Table child, ForeignKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.SIGNATURE_KEY_PAIR_PKEY); + public List> getUniqueKeys() { + return Arrays.asList(Keys.SIGNATURE_KEY_PAIR_UNIQUE_PUBLIC_ID); } @Override @@ -135,6 +139,11 @@ public SignatureKeyPair as(Name alias) { return new SignatureKeyPair(alias, this); } + @Override + public SignatureKeyPair as(Table alias) { + return new SignatureKeyPair(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -151,6 +160,14 @@ public SignatureKeyPair rename(Name name) { return new SignatureKeyPair(name, null); } + /** + * Rename this table + */ + @Override + public SignatureKeyPair rename(Table name) { + return new SignatureKeyPair(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -159,4 +176,19 @@ public SignatureKeyPair rename(Name name) { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSession.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSession.java index 0cd8a578d..56f7839c7 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSession.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSession.java @@ -6,6 +6,7 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Indexes; import org.eclipse.openvsx.jooq.Keys; @@ -13,11 +14,14 @@ import org.eclipse.openvsx.jooq.tables.records.SpringSessionRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function7; import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row7; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -118,12 +122,12 @@ public SpringSession(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.SPRING_SESSION_IX1, Indexes.SPRING_SESSION_IX2, Indexes.SPRING_SESSION_IX3); + return Arrays.asList(Indexes.SPRING_SESSION_IX1, Indexes.SPRING_SESSION_IX2, Indexes.SPRING_SESSION_IX3); } @Override @@ -131,11 +135,6 @@ public UniqueKey getPrimaryKey() { return Keys.SPRING_SESSION_PK; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.SPRING_SESSION_PK); - } - @Override public SpringSession as(String alias) { return new SpringSession(DSL.name(alias), this); @@ -146,6 +145,11 @@ public SpringSession as(Name alias) { return new SpringSession(alias, this); } + @Override + public SpringSession as(Table alias) { + return new SpringSession(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -162,6 +166,14 @@ public SpringSession rename(Name name) { return new SpringSession(name, null); } + /** + * Rename this table + */ + @Override + public SpringSession rename(Table name) { + return new SpringSession(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row7 type methods // ------------------------------------------------------------------------- @@ -170,4 +182,19 @@ public SpringSession rename(Name name) { public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function7 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function7 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSessionAttributes.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSessionAttributes.java index fdae9bd6a..f3694a82e 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSessionAttributes.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/SpringSessionAttributes.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.SpringSessionAttributesRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -47,7 +51,8 @@ public Class getRecordType() { } /** - * The column public.spring_session_attributes.session_primary_id. + * The column + * public.spring_session_attributes.session_primary_id. */ public final TableField SESSION_PRIMARY_ID = createField(DSL.name("session_primary_id"), SQLDataType.CHAR(36).nullable(false), this, ""); @@ -70,14 +75,16 @@ private SpringSessionAttributes(Name alias, Table } /** - * Create an aliased public.spring_session_attributes table reference + * Create an aliased public.spring_session_attributes table + * reference */ public SpringSessionAttributes(String alias) { this(DSL.name(alias), SPRING_SESSION_ATTRIBUTES); } /** - * Create an aliased public.spring_session_attributes table reference + * Create an aliased public.spring_session_attributes table + * reference */ public SpringSessionAttributes(Name alias) { this(alias, SPRING_SESSION_ATTRIBUTES); @@ -96,7 +103,7 @@ public SpringSessionAttributes(Table child, ForeignKey getPrimaryKey() { return Keys.SPRING_SESSION_ATTRIBUTES_PK; } - @Override - public List> getKeys() { - return Arrays.>asList(Keys.SPRING_SESSION_ATTRIBUTES_PK); - } - @Override public List> getReferences() { - return Arrays.>asList(Keys.SPRING_SESSION_ATTRIBUTES__SPRING_SESSION_ATTRIBUTES_FK); + return Arrays.asList(Keys.SPRING_SESSION_ATTRIBUTES__SPRING_SESSION_ATTRIBUTES_FK); } private transient SpringSession _springSession; + /** + * Get the implicit join path to the public.spring_session + * table. + */ public SpringSession springSession() { if (_springSession == null) _springSession = new SpringSession(this, Keys.SPRING_SESSION_ATTRIBUTES__SPRING_SESSION_ATTRIBUTES_FK); @@ -133,6 +139,11 @@ public SpringSessionAttributes as(Name alias) { return new SpringSessionAttributes(alias, this); } + @Override + public SpringSessionAttributes as(Table alias) { + return new SpringSessionAttributes(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -149,6 +160,14 @@ public SpringSessionAttributes rename(Name name) { return new SpringSessionAttributes(name, null); } + /** + * Rename this table + */ + @Override + public SpringSessionAttributes rename(Table name) { + return new SpringSessionAttributes(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -157,4 +176,19 @@ public SpringSessionAttributes rename(Name name) { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/UserData.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/UserData.java index 571d60d76..4226a606d 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/UserData.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/UserData.java @@ -6,16 +6,20 @@ import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.eclipse.openvsx.jooq.Keys; import org.eclipse.openvsx.jooq.Public; import org.eclipse.openvsx.jooq.tables.records.UserDataRecord; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function12; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row12; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -141,7 +145,7 @@ public UserData(Table child, ForeignKey @Override public Schema getSchema() { - return Public.PUBLIC; + return aliased() ? null : Public.PUBLIC; } @Override @@ -150,8 +154,8 @@ public UniqueKey getPrimaryKey() { } @Override - public List> getKeys() { - return Arrays.>asList(Keys.USER_DATA_PKEY); + public List> getUniqueKeys() { + return Arrays.asList(Keys.UNIQUE_USER_DATA); } @Override @@ -164,6 +168,11 @@ public UserData as(Name alias) { return new UserData(alias, this); } + @Override + public UserData as(Table alias) { + return new UserData(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -180,6 +189,14 @@ public UserData rename(Name name) { return new UserData(name, null); } + /** + * Rename this table + */ + @Override + public UserData rename(Table name) { + return new UserData(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row12 type methods // ------------------------------------------------------------------------- @@ -188,4 +205,19 @@ public UserData rename(Name name) { public Row12 fieldsRow() { return (Row12) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function12 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function12 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsExtensionsByRatingRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsExtensionsByRatingRecord.java index fb8bcd403..8a65e2676 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsExtensionsByRatingRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsExtensionsByRatingRecord.java @@ -20,42 +20,48 @@ public class AdminStatisticsExtensionsByRatingRecord extends TableRecordImplpublic.admin_statistics_extensions_by_rating.admin_statistics_id. + * Setter for + * public.admin_statistics_extensions_by_rating.admin_statistics_id. */ public void setAdminStatisticsId(Long value) { set(0, value); } /** - * Getter for public.admin_statistics_extensions_by_rating.admin_statistics_id. + * Getter for + * public.admin_statistics_extensions_by_rating.admin_statistics_id. */ public Long getAdminStatisticsId() { return (Long) get(0); } /** - * Setter for public.admin_statistics_extensions_by_rating.rating. + * Setter for + * public.admin_statistics_extensions_by_rating.rating. */ public void setRating(Integer value) { set(1, value); } /** - * Getter for public.admin_statistics_extensions_by_rating.rating. + * Getter for + * public.admin_statistics_extensions_by_rating.rating. */ public Integer getRating() { return (Integer) get(1); } /** - * Setter for public.admin_statistics_extensions_by_rating.extensions. + * Setter for + * public.admin_statistics_extensions_by_rating.extensions. */ public void setExtensions(Integer value) { set(2, value); } /** - * Getter for public.admin_statistics_extensions_by_rating.extensions. + * Getter for + * public.admin_statistics_extensions_by_rating.extensions. */ public Integer getExtensions() { return (Integer) get(2); @@ -166,5 +172,6 @@ public AdminStatisticsExtensionsByRatingRecord(Long adminStatisticsId, Integer r setAdminStatisticsId(adminStatisticsId); setRating(rating); setExtensions(extensions); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsPublishersByExtensionsPublishedRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsPublishersByExtensionsPublishedRecord.java index 9515e8f69..a17c5db97 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsPublishersByExtensionsPublishedRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsPublishersByExtensionsPublishedRecord.java @@ -20,42 +20,48 @@ public class AdminStatisticsPublishersByExtensionsPublishedRecord extends TableR private static final long serialVersionUID = 1L; /** - * Setter for public.admin_statistics_publishers_by_extensions_published.admin_statistics_id. + * Setter for + * public.admin_statistics_publishers_by_extensions_published.admin_statistics_id. */ public void setAdminStatisticsId(Long value) { set(0, value); } /** - * Getter for public.admin_statistics_publishers_by_extensions_published.admin_statistics_id. + * Getter for + * public.admin_statistics_publishers_by_extensions_published.admin_statistics_id. */ public Long getAdminStatisticsId() { return (Long) get(0); } /** - * Setter for public.admin_statistics_publishers_by_extensions_published.extensions_published. + * Setter for + * public.admin_statistics_publishers_by_extensions_published.extensions_published. */ public void setExtensionsPublished(Integer value) { set(1, value); } /** - * Getter for public.admin_statistics_publishers_by_extensions_published.extensions_published. + * Getter for + * public.admin_statistics_publishers_by_extensions_published.extensions_published. */ public Integer getExtensionsPublished() { return (Integer) get(1); } /** - * Setter for public.admin_statistics_publishers_by_extensions_published.publishers. + * Setter for + * public.admin_statistics_publishers_by_extensions_published.publishers. */ public void setPublishers(Integer value) { set(2, value); } /** - * Getter for public.admin_statistics_publishers_by_extensions_published.publishers. + * Getter for + * public.admin_statistics_publishers_by_extensions_published.publishers. */ public Integer getPublishers() { return (Integer) get(2); @@ -158,7 +164,8 @@ public AdminStatisticsPublishersByExtensionsPublishedRecord() { } /** - * Create a detached, initialised AdminStatisticsPublishersByExtensionsPublishedRecord + * Create a detached, initialised + * AdminStatisticsPublishersByExtensionsPublishedRecord */ public AdminStatisticsPublishersByExtensionsPublishedRecord(Long adminStatisticsId, Integer extensionsPublished, Integer publishers) { super(AdminStatisticsPublishersByExtensionsPublished.ADMIN_STATISTICS_PUBLISHERS_BY_EXTENSIONS_PUBLISHED); @@ -166,5 +173,6 @@ public AdminStatisticsPublishersByExtensionsPublishedRecord(Long adminStatistics setAdminStatisticsId(adminStatisticsId); setExtensionsPublished(extensionsPublished); setPublishers(publishers); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsRecord.java index 6e14fdc52..5ff8cbc68 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsRecord.java @@ -119,14 +119,16 @@ public Long getPublishers() { } /** - * Setter for public.admin_statistics.average_reviews_per_extension. + * Setter for + * public.admin_statistics.average_reviews_per_extension. */ public void setAverageReviewsPerExtension(Double value) { set(7, value); } /** - * Getter for public.admin_statistics.average_reviews_per_extension. + * Getter for + * public.admin_statistics.average_reviews_per_extension. */ public Double getAverageReviewsPerExtension() { return (Double) get(7); @@ -398,5 +400,6 @@ public AdminStatisticsRecord(Long id, Integer year, Integer month, Long extensio setPublishers(publishers); setAverageReviewsPerExtension(averageReviewsPerExtension); setNamespaceOwners(namespaceOwners); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostActivePublishingUsersRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostActivePublishingUsersRecord.java index 136d12297..0af843772 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostActivePublishingUsersRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostActivePublishingUsersRecord.java @@ -20,42 +20,48 @@ public class AdminStatisticsTopMostActivePublishingUsersRecord extends TableReco private static final long serialVersionUID = 1L; /** - * Setter for public.admin_statistics_top_most_active_publishing_users.admin_statistics_id. + * Setter for + * public.admin_statistics_top_most_active_publishing_users.admin_statistics_id. */ public void setAdminStatisticsId(Long value) { set(0, value); } /** - * Getter for public.admin_statistics_top_most_active_publishing_users.admin_statistics_id. + * Getter for + * public.admin_statistics_top_most_active_publishing_users.admin_statistics_id. */ public Long getAdminStatisticsId() { return (Long) get(0); } /** - * Setter for public.admin_statistics_top_most_active_publishing_users.login_name. + * Setter for + * public.admin_statistics_top_most_active_publishing_users.login_name. */ public void setLoginName(String value) { set(1, value); } /** - * Getter for public.admin_statistics_top_most_active_publishing_users.login_name. + * Getter for + * public.admin_statistics_top_most_active_publishing_users.login_name. */ public String getLoginName() { return (String) get(1); } /** - * Setter for public.admin_statistics_top_most_active_publishing_users.extension_version_count. + * Setter for + * public.admin_statistics_top_most_active_publishing_users.extension_version_count. */ public void setExtensionVersionCount(Integer value) { set(2, value); } /** - * Getter for public.admin_statistics_top_most_active_publishing_users.extension_version_count. + * Getter for + * public.admin_statistics_top_most_active_publishing_users.extension_version_count. */ public Integer getExtensionVersionCount() { return (Integer) get(2); @@ -158,7 +164,8 @@ public AdminStatisticsTopMostActivePublishingUsersRecord() { } /** - * Create a detached, initialised AdminStatisticsTopMostActivePublishingUsersRecord + * Create a detached, initialised + * AdminStatisticsTopMostActivePublishingUsersRecord */ public AdminStatisticsTopMostActivePublishingUsersRecord(Long adminStatisticsId, String loginName, Integer extensionVersionCount) { super(AdminStatisticsTopMostActivePublishingUsers.ADMIN_STATISTICS_TOP_MOST_ACTIVE_PUBLISHING_USERS); @@ -166,5 +173,6 @@ public AdminStatisticsTopMostActivePublishingUsersRecord(Long adminStatisticsId, setAdminStatisticsId(adminStatisticsId); setLoginName(loginName); setExtensionVersionCount(extensionVersionCount); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostDownloadedExtensionsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostDownloadedExtensionsRecord.java index 055f36550..7fca6f177 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostDownloadedExtensionsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopMostDownloadedExtensionsRecord.java @@ -20,42 +20,48 @@ public class AdminStatisticsTopMostDownloadedExtensionsRecord extends TableRecor private static final long serialVersionUID = 1L; /** - * Setter for public.admin_statistics_top_most_downloaded_extensions.admin_statistics_id. + * Setter for + * public.admin_statistics_top_most_downloaded_extensions.admin_statistics_id. */ public void setAdminStatisticsId(Long value) { set(0, value); } /** - * Getter for public.admin_statistics_top_most_downloaded_extensions.admin_statistics_id. + * Getter for + * public.admin_statistics_top_most_downloaded_extensions.admin_statistics_id. */ public Long getAdminStatisticsId() { return (Long) get(0); } /** - * Setter for public.admin_statistics_top_most_downloaded_extensions.extension_identifier. + * Setter for + * public.admin_statistics_top_most_downloaded_extensions.extension_identifier. */ public void setExtensionIdentifier(String value) { set(1, value); } /** - * Getter for public.admin_statistics_top_most_downloaded_extensions.extension_identifier. + * Getter for + * public.admin_statistics_top_most_downloaded_extensions.extension_identifier. */ public String getExtensionIdentifier() { return (String) get(1); } /** - * Setter for public.admin_statistics_top_most_downloaded_extensions.downloads. + * Setter for + * public.admin_statistics_top_most_downloaded_extensions.downloads. */ public void setDownloads(Long value) { set(2, value); } /** - * Getter for public.admin_statistics_top_most_downloaded_extensions.downloads. + * Getter for + * public.admin_statistics_top_most_downloaded_extensions.downloads. */ public Long getDownloads() { return (Long) get(2); @@ -158,7 +164,8 @@ public AdminStatisticsTopMostDownloadedExtensionsRecord() { } /** - * Create a detached, initialised AdminStatisticsTopMostDownloadedExtensionsRecord + * Create a detached, initialised + * AdminStatisticsTopMostDownloadedExtensionsRecord */ public AdminStatisticsTopMostDownloadedExtensionsRecord(Long adminStatisticsId, String extensionIdentifier, Long downloads) { super(AdminStatisticsTopMostDownloadedExtensions.ADMIN_STATISTICS_TOP_MOST_DOWNLOADED_EXTENSIONS); @@ -166,5 +173,6 @@ public AdminStatisticsTopMostDownloadedExtensionsRecord(Long adminStatisticsId, setAdminStatisticsId(adminStatisticsId); setExtensionIdentifier(extensionIdentifier); setDownloads(downloads); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionVersionsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionVersionsRecord.java index 09ca331ad..a72922e30 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionVersionsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionVersionsRecord.java @@ -20,42 +20,48 @@ public class AdminStatisticsTopNamespaceExtensionVersionsRecord extends TableRec private static final long serialVersionUID = 1L; /** - * Setter for public.admin_statistics_top_namespace_extension_versions.admin_statistics_id. + * Setter for + * public.admin_statistics_top_namespace_extension_versions.admin_statistics_id. */ public void setAdminStatisticsId(Long value) { set(0, value); } /** - * Getter for public.admin_statistics_top_namespace_extension_versions.admin_statistics_id. + * Getter for + * public.admin_statistics_top_namespace_extension_versions.admin_statistics_id. */ public Long getAdminStatisticsId() { return (Long) get(0); } /** - * Setter for public.admin_statistics_top_namespace_extension_versions.namespace. + * Setter for + * public.admin_statistics_top_namespace_extension_versions.namespace. */ public void setNamespace(String value) { set(1, value); } /** - * Getter for public.admin_statistics_top_namespace_extension_versions.namespace. + * Getter for + * public.admin_statistics_top_namespace_extension_versions.namespace. */ public String getNamespace() { return (String) get(1); } /** - * Setter for public.admin_statistics_top_namespace_extension_versions.extension_version_count. + * Setter for + * public.admin_statistics_top_namespace_extension_versions.extension_version_count. */ public void setExtensionVersionCount(Integer value) { set(2, value); } /** - * Getter for public.admin_statistics_top_namespace_extension_versions.extension_version_count. + * Getter for + * public.admin_statistics_top_namespace_extension_versions.extension_version_count. */ public Integer getExtensionVersionCount() { return (Integer) get(2); @@ -158,7 +164,8 @@ public AdminStatisticsTopNamespaceExtensionVersionsRecord() { } /** - * Create a detached, initialised AdminStatisticsTopNamespaceExtensionVersionsRecord + * Create a detached, initialised + * AdminStatisticsTopNamespaceExtensionVersionsRecord */ public AdminStatisticsTopNamespaceExtensionVersionsRecord(Long adminStatisticsId, String namespace, Integer extensionVersionCount) { super(AdminStatisticsTopNamespaceExtensionVersions.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSION_VERSIONS); @@ -166,5 +173,6 @@ public AdminStatisticsTopNamespaceExtensionVersionsRecord(Long adminStatisticsId setAdminStatisticsId(adminStatisticsId); setNamespace(namespace); setExtensionVersionCount(extensionVersionCount); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionsRecord.java index 59afe09ea..ed69862c8 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AdminStatisticsTopNamespaceExtensionsRecord.java @@ -20,42 +20,48 @@ public class AdminStatisticsTopNamespaceExtensionsRecord extends TableRecordImpl private static final long serialVersionUID = 1L; /** - * Setter for public.admin_statistics_top_namespace_extensions.admin_statistics_id. + * Setter for + * public.admin_statistics_top_namespace_extensions.admin_statistics_id. */ public void setAdminStatisticsId(Long value) { set(0, value); } /** - * Getter for public.admin_statistics_top_namespace_extensions.admin_statistics_id. + * Getter for + * public.admin_statistics_top_namespace_extensions.admin_statistics_id. */ public Long getAdminStatisticsId() { return (Long) get(0); } /** - * Setter for public.admin_statistics_top_namespace_extensions.namespace. + * Setter for + * public.admin_statistics_top_namespace_extensions.namespace. */ public void setNamespace(String value) { set(1, value); } /** - * Getter for public.admin_statistics_top_namespace_extensions.namespace. + * Getter for + * public.admin_statistics_top_namespace_extensions.namespace. */ public String getNamespace() { return (String) get(1); } /** - * Setter for public.admin_statistics_top_namespace_extensions.extension_count. + * Setter for + * public.admin_statistics_top_namespace_extensions.extension_count. */ public void setExtensionCount(Integer value) { set(2, value); } /** - * Getter for public.admin_statistics_top_namespace_extensions.extension_count. + * Getter for + * public.admin_statistics_top_namespace_extensions.extension_count. */ public Integer getExtensionCount() { return (Integer) get(2); @@ -158,7 +164,8 @@ public AdminStatisticsTopNamespaceExtensionsRecord() { } /** - * Create a detached, initialised AdminStatisticsTopNamespaceExtensionsRecord + * Create a detached, initialised + * AdminStatisticsTopNamespaceExtensionsRecord */ public AdminStatisticsTopNamespaceExtensionsRecord(Long adminStatisticsId, String namespace, Integer extensionCount) { super(AdminStatisticsTopNamespaceExtensions.ADMIN_STATISTICS_TOP_NAMESPACE_EXTENSIONS); @@ -166,5 +173,6 @@ public AdminStatisticsTopNamespaceExtensionsRecord(Long adminStatisticsId, Strin setAdminStatisticsId(adminStatisticsId); setNamespace(namespace); setExtensionCount(extensionCount); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AzureDownloadCountProcessedItemRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AzureDownloadCountProcessedItemRecord.java index 1d5bd23ce..c0357acea 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AzureDownloadCountProcessedItemRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/AzureDownloadCountProcessedItemRecord.java @@ -51,42 +51,48 @@ public String getName() { } /** - * Setter for public.azure_download_count_processed_item.processed_on. + * Setter for + * public.azure_download_count_processed_item.processed_on. */ public void setProcessedOn(LocalDateTime value) { set(2, value); } /** - * Getter for public.azure_download_count_processed_item.processed_on. + * Getter for + * public.azure_download_count_processed_item.processed_on. */ public LocalDateTime getProcessedOn() { return (LocalDateTime) get(2); } /** - * Setter for public.azure_download_count_processed_item.execution_time. + * Setter for + * public.azure_download_count_processed_item.execution_time. */ public void setExecutionTime(Integer value) { set(3, value); } /** - * Getter for public.azure_download_count_processed_item.execution_time. + * Getter for + * public.azure_download_count_processed_item.execution_time. */ public Integer getExecutionTime() { return (Integer) get(3); } /** - * Setter for public.azure_download_count_processed_item.success. + * Setter for + * public.azure_download_count_processed_item.success. */ public void setSuccess(Boolean value) { set(4, value); } /** - * Getter for public.azure_download_count_processed_item.success. + * Getter for + * public.azure_download_count_processed_item.success. */ public Boolean getSuccess() { return (Boolean) get(4); @@ -252,5 +258,6 @@ public AzureDownloadCountProcessedItemRecord(Long id, String name, LocalDateTime setProcessedOn(processedOn); setExecutionTime(executionTime); setSuccess(success); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/DownloadRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/DownloadRecord.java deleted file mode 100644 index 9a88a455c..000000000 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/DownloadRecord.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package org.eclipse.openvsx.jooq.tables.records; - - -import java.time.LocalDateTime; - -import org.eclipse.openvsx.jooq.tables.Download; -import org.jooq.Field; -import org.jooq.Record1; -import org.jooq.Record4; -import org.jooq.Row4; -import org.jooq.impl.UpdatableRecordImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DownloadRecord extends UpdatableRecordImpl implements Record4 { - - private static final long serialVersionUID = 1L; - - /** - * Setter for public.download.id. - */ - public void setId(Long value) { - set(0, value); - } - - /** - * Getter for public.download.id. - */ - public Long getId() { - return (Long) get(0); - } - - /** - * Setter for public.download.file_resource_id_not_fk. - */ - public void setFileResourceIdNotFk(Long value) { - set(1, value); - } - - /** - * Getter for public.download.file_resource_id_not_fk. - */ - public Long getFileResourceIdNotFk() { - return (Long) get(1); - } - - /** - * Setter for public.download.timestamp. - */ - public void setTimestamp(LocalDateTime value) { - set(2, value); - } - - /** - * Getter for public.download.timestamp. - */ - public LocalDateTime getTimestamp() { - return (LocalDateTime) get(2); - } - - /** - * Setter for public.download.amount. - */ - public void setAmount(Integer value) { - set(3, value); - } - - /** - * Getter for public.download.amount. - */ - public Integer getAmount() { - return (Integer) get(3); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record4 type implementation - // ------------------------------------------------------------------------- - - @Override - public Row4 fieldsRow() { - return (Row4) super.fieldsRow(); - } - - @Override - public Row4 valuesRow() { - return (Row4) super.valuesRow(); - } - - @Override - public Field field1() { - return Download.DOWNLOAD.ID; - } - - @Override - public Field field2() { - return Download.DOWNLOAD.FILE_RESOURCE_ID_NOT_FK; - } - - @Override - public Field field3() { - return Download.DOWNLOAD.TIMESTAMP; - } - - @Override - public Field field4() { - return Download.DOWNLOAD.AMOUNT; - } - - @Override - public Long component1() { - return getId(); - } - - @Override - public Long component2() { - return getFileResourceIdNotFk(); - } - - @Override - public LocalDateTime component3() { - return getTimestamp(); - } - - @Override - public Integer component4() { - return getAmount(); - } - - @Override - public Long value1() { - return getId(); - } - - @Override - public Long value2() { - return getFileResourceIdNotFk(); - } - - @Override - public LocalDateTime value3() { - return getTimestamp(); - } - - @Override - public Integer value4() { - return getAmount(); - } - - @Override - public DownloadRecord value1(Long value) { - setId(value); - return this; - } - - @Override - public DownloadRecord value2(Long value) { - setFileResourceIdNotFk(value); - return this; - } - - @Override - public DownloadRecord value3(LocalDateTime value) { - setTimestamp(value); - return this; - } - - @Override - public DownloadRecord value4(Integer value) { - setAmount(value); - return this; - } - - @Override - public DownloadRecord values(Long value1, Long value2, LocalDateTime value3, Integer value4) { - value1(value1); - value2(value2); - value3(value3); - value4(value4); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached DownloadRecord - */ - public DownloadRecord() { - super(Download.DOWNLOAD); - } - - /** - * Create a detached, initialised DownloadRecord - */ - public DownloadRecord(Long id, Long fileResourceIdNotFk, LocalDateTime timestamp, Integer amount) { - super(Download.DOWNLOAD); - - setId(id); - setFileResourceIdNotFk(fileResourceIdNotFk); - setTimestamp(timestamp); - setAmount(amount); - } -} diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/EntityActiveStateRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/EntityActiveStateRecord.java deleted file mode 100644 index b4b8447bf..000000000 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/EntityActiveStateRecord.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package org.eclipse.openvsx.jooq.tables.records; - - -import java.time.LocalDateTime; - -import org.eclipse.openvsx.jooq.tables.EntityActiveState; -import org.jooq.Field; -import org.jooq.Record1; -import org.jooq.Record5; -import org.jooq.Row5; -import org.jooq.impl.UpdatableRecordImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class EntityActiveStateRecord extends UpdatableRecordImpl implements Record5 { - - private static final long serialVersionUID = 1L; - - /** - * Setter for public.entity_active_state.id. - */ - public void setId(Long value) { - set(0, value); - } - - /** - * Getter for public.entity_active_state.id. - */ - public Long getId() { - return (Long) get(0); - } - - /** - * Setter for public.entity_active_state.entity_id. - */ - public void setEntityId(Long value) { - set(1, value); - } - - /** - * Getter for public.entity_active_state.entity_id. - */ - public Long getEntityId() { - return (Long) get(1); - } - - /** - * Setter for public.entity_active_state.entity_type. - */ - public void setEntityType(String value) { - set(2, value); - } - - /** - * Getter for public.entity_active_state.entity_type. - */ - public String getEntityType() { - return (String) get(2); - } - - /** - * Setter for public.entity_active_state.active. - */ - public void setActive(Boolean value) { - set(3, value); - } - - /** - * Getter for public.entity_active_state.active. - */ - public Boolean getActive() { - return (Boolean) get(3); - } - - /** - * Setter for public.entity_active_state.timestamp. - */ - public void setTimestamp(LocalDateTime value) { - set(4, value); - } - - /** - * Getter for public.entity_active_state.timestamp. - */ - public LocalDateTime getTimestamp() { - return (LocalDateTime) get(4); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record5 type implementation - // ------------------------------------------------------------------------- - - @Override - public Row5 fieldsRow() { - return (Row5) super.fieldsRow(); - } - - @Override - public Row5 valuesRow() { - return (Row5) super.valuesRow(); - } - - @Override - public Field field1() { - return EntityActiveState.ENTITY_ACTIVE_STATE.ID; - } - - @Override - public Field field2() { - return EntityActiveState.ENTITY_ACTIVE_STATE.ENTITY_ID; - } - - @Override - public Field field3() { - return EntityActiveState.ENTITY_ACTIVE_STATE.ENTITY_TYPE; - } - - @Override - public Field field4() { - return EntityActiveState.ENTITY_ACTIVE_STATE.ACTIVE; - } - - @Override - public Field field5() { - return EntityActiveState.ENTITY_ACTIVE_STATE.TIMESTAMP; - } - - @Override - public Long component1() { - return getId(); - } - - @Override - public Long component2() { - return getEntityId(); - } - - @Override - public String component3() { - return getEntityType(); - } - - @Override - public Boolean component4() { - return getActive(); - } - - @Override - public LocalDateTime component5() { - return getTimestamp(); - } - - @Override - public Long value1() { - return getId(); - } - - @Override - public Long value2() { - return getEntityId(); - } - - @Override - public String value3() { - return getEntityType(); - } - - @Override - public Boolean value4() { - return getActive(); - } - - @Override - public LocalDateTime value5() { - return getTimestamp(); - } - - @Override - public EntityActiveStateRecord value1(Long value) { - setId(value); - return this; - } - - @Override - public EntityActiveStateRecord value2(Long value) { - setEntityId(value); - return this; - } - - @Override - public EntityActiveStateRecord value3(String value) { - setEntityType(value); - return this; - } - - @Override - public EntityActiveStateRecord value4(Boolean value) { - setActive(value); - return this; - } - - @Override - public EntityActiveStateRecord value5(LocalDateTime value) { - setTimestamp(value); - return this; - } - - @Override - public EntityActiveStateRecord values(Long value1, Long value2, String value3, Boolean value4, LocalDateTime value5) { - value1(value1); - value2(value2); - value3(value3); - value4(value4); - value5(value5); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached EntityActiveStateRecord - */ - public EntityActiveStateRecord() { - super(EntityActiveState.ENTITY_ACTIVE_STATE); - } - - /** - * Create a detached, initialised EntityActiveStateRecord - */ - public EntityActiveStateRecord(Long id, Long entityId, String entityType, Boolean active, LocalDateTime timestamp) { - super(EntityActiveState.ENTITY_ACTIVE_STATE); - - setId(id); - setEntityId(entityId); - setEntityType(entityType); - setActive(active); - setTimestamp(timestamp); - } -} diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionRecord.java index 2ba41e704..c3157673a 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionRecord.java @@ -437,5 +437,6 @@ public ExtensionRecord(Long id, Double averageRating, Integer downloadCount, Str setPublishedDate(publishedDate); setLastUpdatedDate(lastUpdatedDate); setReviewCount(reviewCount); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionReviewRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionReviewRecord.java index a00a740b3..1f953b4df 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionReviewRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionReviewRecord.java @@ -363,5 +363,6 @@ public ExtensionReviewRecord(Long id, Boolean active, String comment, Integer ra setTitle(title); setExtensionId(extensionId); setUserId(userId); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionVersionRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionVersionRecord.java index 96874923d..927494f36 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionVersionRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ExtensionVersionRecord.java @@ -496,14 +496,16 @@ public String getSemverBuildMetadata() { } /** - * Setter for public.extension_version.universal_target_platform. + * Setter for + * public.extension_version.universal_target_platform. */ public void setUniversalTargetPlatform(Boolean value) { set(34, value); } /** - * Getter for public.extension_version.universal_target_platform. + * Getter for + * public.extension_version.universal_target_platform. */ public Boolean getUniversalTargetPlatform() { return (Boolean) get(34); @@ -570,5 +572,6 @@ public ExtensionVersionRecord(Long id, String bugs, String description, String d setSemverIsPreRelease(semverIsPreRelease); setSemverBuildMetadata(semverBuildMetadata); setUniversalTargetPlatform(universalTargetPlatform); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FileResourceRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FileResourceRecord.java index 8203f55f1..12aa25a21 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FileResourceRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FileResourceRecord.java @@ -287,5 +287,6 @@ public FileResourceRecord(Long id, String type, byte[] content, Long extensionId setExtensionId(extensionId); setName(name); setStorageType(storageType); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FlywaySchemaHistoryRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FlywaySchemaHistoryRecord.java index 17daedd20..e7332bbaf 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FlywaySchemaHistoryRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/FlywaySchemaHistoryRecord.java @@ -437,5 +437,6 @@ public FlywaySchemaHistoryRecord(Integer installedRank, String version, String d setInstalledOn(installedOn); setExecutionTime(executionTime); setSuccess(success); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrBackgroundjobserversRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrBackgroundjobserversRecord.java index 0acb48250..418ccedd0 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrBackgroundjobserversRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrBackgroundjobserversRecord.java @@ -10,8 +10,8 @@ import org.eclipse.openvsx.jooq.tables.JobrunrBackgroundjobservers; import org.jooq.Field; import org.jooq.Record1; -import org.jooq.Record15; -import org.jooq.Row15; +import org.jooq.Record16; +import org.jooq.Row16; import org.jooq.impl.UpdatableRecordImpl; @@ -19,7 +19,7 @@ * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class JobrunrBackgroundjobserversRecord extends UpdatableRecordImpl implements Record15 { +public class JobrunrBackgroundjobserversRecord extends UpdatableRecordImpl implements Record16 { private static final long serialVersionUID = 1L; @@ -38,56 +38,64 @@ public String getId() { } /** - * Setter for public.jobrunr_backgroundjobservers.workerpoolsize. + * Setter for + * public.jobrunr_backgroundjobservers.workerpoolsize. */ public void setWorkerpoolsize(Integer value) { set(1, value); } /** - * Getter for public.jobrunr_backgroundjobservers.workerpoolsize. + * Getter for + * public.jobrunr_backgroundjobservers.workerpoolsize. */ public Integer getWorkerpoolsize() { return (Integer) get(1); } /** - * Setter for public.jobrunr_backgroundjobservers.pollintervalinseconds. + * Setter for + * public.jobrunr_backgroundjobservers.pollintervalinseconds. */ public void setPollintervalinseconds(Integer value) { set(2, value); } /** - * Getter for public.jobrunr_backgroundjobservers.pollintervalinseconds. + * Getter for + * public.jobrunr_backgroundjobservers.pollintervalinseconds. */ public Integer getPollintervalinseconds() { return (Integer) get(2); } /** - * Setter for public.jobrunr_backgroundjobservers.firstheartbeat. + * Setter for + * public.jobrunr_backgroundjobservers.firstheartbeat. */ public void setFirstheartbeat(LocalDateTime value) { set(3, value); } /** - * Getter for public.jobrunr_backgroundjobservers.firstheartbeat. + * Getter for + * public.jobrunr_backgroundjobservers.firstheartbeat. */ public LocalDateTime getFirstheartbeat() { return (LocalDateTime) get(3); } /** - * Setter for public.jobrunr_backgroundjobservers.lastheartbeat. + * Setter for + * public.jobrunr_backgroundjobservers.lastheartbeat. */ public void setLastheartbeat(LocalDateTime value) { set(4, value); } /** - * Getter for public.jobrunr_backgroundjobservers.lastheartbeat. + * Getter for + * public.jobrunr_backgroundjobservers.lastheartbeat. */ public LocalDateTime getLastheartbeat() { return (LocalDateTime) get(4); @@ -108,131 +116,163 @@ public Integer getRunning() { } /** - * Setter for public.jobrunr_backgroundjobservers.systemtotalmemory. + * Setter for + * public.jobrunr_backgroundjobservers.systemtotalmemory. */ public void setSystemtotalmemory(Long value) { set(6, value); } /** - * Getter for public.jobrunr_backgroundjobservers.systemtotalmemory. + * Getter for + * public.jobrunr_backgroundjobservers.systemtotalmemory. */ public Long getSystemtotalmemory() { return (Long) get(6); } /** - * Setter for public.jobrunr_backgroundjobservers.systemfreememory. + * Setter for + * public.jobrunr_backgroundjobservers.systemfreememory. */ public void setSystemfreememory(Long value) { set(7, value); } /** - * Getter for public.jobrunr_backgroundjobservers.systemfreememory. + * Getter for + * public.jobrunr_backgroundjobservers.systemfreememory. */ public Long getSystemfreememory() { return (Long) get(7); } /** - * Setter for public.jobrunr_backgroundjobservers.systemcpuload. + * Setter for + * public.jobrunr_backgroundjobservers.systemcpuload. */ public void setSystemcpuload(BigDecimal value) { set(8, value); } /** - * Getter for public.jobrunr_backgroundjobservers.systemcpuload. + * Getter for + * public.jobrunr_backgroundjobservers.systemcpuload. */ public BigDecimal getSystemcpuload() { return (BigDecimal) get(8); } /** - * Setter for public.jobrunr_backgroundjobservers.processmaxmemory. + * Setter for + * public.jobrunr_backgroundjobservers.processmaxmemory. */ public void setProcessmaxmemory(Long value) { set(9, value); } /** - * Getter for public.jobrunr_backgroundjobservers.processmaxmemory. + * Getter for + * public.jobrunr_backgroundjobservers.processmaxmemory. */ public Long getProcessmaxmemory() { return (Long) get(9); } /** - * Setter for public.jobrunr_backgroundjobservers.processfreememory. + * Setter for + * public.jobrunr_backgroundjobservers.processfreememory. */ public void setProcessfreememory(Long value) { set(10, value); } /** - * Getter for public.jobrunr_backgroundjobservers.processfreememory. + * Getter for + * public.jobrunr_backgroundjobservers.processfreememory. */ public Long getProcessfreememory() { return (Long) get(10); } /** - * Setter for public.jobrunr_backgroundjobservers.processallocatedmemory. + * Setter for + * public.jobrunr_backgroundjobservers.processallocatedmemory. */ public void setProcessallocatedmemory(Long value) { set(11, value); } /** - * Getter for public.jobrunr_backgroundjobservers.processallocatedmemory. + * Getter for + * public.jobrunr_backgroundjobservers.processallocatedmemory. */ public Long getProcessallocatedmemory() { return (Long) get(11); } /** - * Setter for public.jobrunr_backgroundjobservers.processcpuload. + * Setter for + * public.jobrunr_backgroundjobservers.processcpuload. */ public void setProcesscpuload(BigDecimal value) { set(12, value); } /** - * Getter for public.jobrunr_backgroundjobservers.processcpuload. + * Getter for + * public.jobrunr_backgroundjobservers.processcpuload. */ public BigDecimal getProcesscpuload() { return (BigDecimal) get(12); } /** - * Setter for public.jobrunr_backgroundjobservers.deletesucceededjobsafter. + * Setter for + * public.jobrunr_backgroundjobservers.deletesucceededjobsafter. */ public void setDeletesucceededjobsafter(String value) { set(13, value); } /** - * Getter for public.jobrunr_backgroundjobservers.deletesucceededjobsafter. + * Getter for + * public.jobrunr_backgroundjobservers.deletesucceededjobsafter. */ public String getDeletesucceededjobsafter() { return (String) get(13); } /** - * Setter for public.jobrunr_backgroundjobservers.permanentlydeletejobsafter. + * Setter for + * public.jobrunr_backgroundjobservers.permanentlydeletejobsafter. */ public void setPermanentlydeletejobsafter(String value) { set(14, value); } /** - * Getter for public.jobrunr_backgroundjobservers.permanentlydeletejobsafter. + * Getter for + * public.jobrunr_backgroundjobservers.permanentlydeletejobsafter. */ public String getPermanentlydeletejobsafter() { return (String) get(14); } + /** + * Setter for public.jobrunr_backgroundjobservers.name. + */ + public void setName(String value) { + set(15, value); + } + + /** + * Getter for public.jobrunr_backgroundjobservers.name. + */ + public String getName() { + return (String) get(15); + } + // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- @@ -243,17 +283,17 @@ public Record1 key() { } // ------------------------------------------------------------------------- - // Record15 type implementation + // Record16 type implementation // ------------------------------------------------------------------------- @Override - public Row15 fieldsRow() { - return (Row15) super.fieldsRow(); + public Row16 fieldsRow() { + return (Row16) super.fieldsRow(); } @Override - public Row15 valuesRow() { - return (Row15) super.valuesRow(); + public Row16 valuesRow() { + return (Row16) super.valuesRow(); } @Override @@ -331,6 +371,11 @@ public Field field15() { return JobrunrBackgroundjobservers.JOBRUNR_BACKGROUNDJOBSERVERS.PERMANENTLYDELETEJOBSAFTER; } + @Override + public Field field16() { + return JobrunrBackgroundjobservers.JOBRUNR_BACKGROUNDJOBSERVERS.NAME; + } + @Override public String component1() { return getId(); @@ -406,6 +451,11 @@ public String component15() { return getPermanentlydeletejobsafter(); } + @Override + public String component16() { + return getName(); + } + @Override public String value1() { return getId(); @@ -481,6 +531,11 @@ public String value15() { return getPermanentlydeletejobsafter(); } + @Override + public String value16() { + return getName(); + } + @Override public JobrunrBackgroundjobserversRecord value1(String value) { setId(value); @@ -572,7 +627,13 @@ public JobrunrBackgroundjobserversRecord value15(String value) { } @Override - public JobrunrBackgroundjobserversRecord values(String value1, Integer value2, Integer value3, LocalDateTime value4, LocalDateTime value5, Integer value6, Long value7, Long value8, BigDecimal value9, Long value10, Long value11, Long value12, BigDecimal value13, String value14, String value15) { + public JobrunrBackgroundjobserversRecord value16(String value) { + setName(value); + return this; + } + + @Override + public JobrunrBackgroundjobserversRecord values(String value1, Integer value2, Integer value3, LocalDateTime value4, LocalDateTime value5, Integer value6, Long value7, Long value8, BigDecimal value9, Long value10, Long value11, Long value12, BigDecimal value13, String value14, String value15, String value16) { value1(value1); value2(value2); value3(value3); @@ -588,6 +649,7 @@ public JobrunrBackgroundjobserversRecord values(String value1, Integer value2, I value13(value13); value14(value14); value15(value15); + value16(value16); return this; } @@ -605,7 +667,7 @@ public JobrunrBackgroundjobserversRecord() { /** * Create a detached, initialised JobrunrBackgroundjobserversRecord */ - public JobrunrBackgroundjobserversRecord(String id, Integer workerpoolsize, Integer pollintervalinseconds, LocalDateTime firstheartbeat, LocalDateTime lastheartbeat, Integer running, Long systemtotalmemory, Long systemfreememory, BigDecimal systemcpuload, Long processmaxmemory, Long processfreememory, Long processallocatedmemory, BigDecimal processcpuload, String deletesucceededjobsafter, String permanentlydeletejobsafter) { + public JobrunrBackgroundjobserversRecord(String id, Integer workerpoolsize, Integer pollintervalinseconds, LocalDateTime firstheartbeat, LocalDateTime lastheartbeat, Integer running, Long systemtotalmemory, Long systemfreememory, BigDecimal systemcpuload, Long processmaxmemory, Long processfreememory, Long processallocatedmemory, BigDecimal processcpuload, String deletesucceededjobsafter, String permanentlydeletejobsafter, String name) { super(JobrunrBackgroundjobservers.JOBRUNR_BACKGROUNDJOBSERVERS); setId(id); @@ -623,5 +685,7 @@ public JobrunrBackgroundjobserversRecord(String id, Integer workerpoolsize, Inte setProcesscpuload(processcpuload); setDeletesucceededjobsafter(deletesucceededjobsafter); setPermanentlydeletejobsafter(permanentlydeletejobsafter); + setName(name); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsRecord.java index b2bfa0a57..a2612d47b 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsRecord.java @@ -400,5 +400,6 @@ public JobrunrJobsRecord(String id, Integer version, String jobasjson, String jo setUpdatedat(updatedat); setScheduledat(scheduledat); setRecurringjobid(recurringjobid); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsStatsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsStatsRecord.java index 40cadbd0b..e5f82a233 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsStatsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrJobsStatsRecord.java @@ -4,10 +4,12 @@ package org.eclipse.openvsx.jooq.tables.records; +import java.math.BigDecimal; + import org.eclipse.openvsx.jooq.tables.JobrunrJobsStats; import org.jooq.Field; -import org.jooq.Record11; -import org.jooq.Row11; +import org.jooq.Record10; +import org.jooq.Row10; import org.jooq.impl.TableRecordImpl; @@ -15,7 +17,7 @@ * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class JobrunrJobsStatsRecord extends TableRecordImpl implements Record11 { +public class JobrunrJobsStatsRecord extends TableRecordImpl implements Record10 { private static final long serialVersionUID = 1L; @@ -33,158 +35,146 @@ public Long getTotal() { return (Long) get(0); } - /** - * Setter for public.jobrunr_jobs_stats.awaiting. - */ - public void setAwaiting(Long value) { - set(1, value); - } - - /** - * Getter for public.jobrunr_jobs_stats.awaiting. - */ - public Long getAwaiting() { - return (Long) get(1); - } - /** * Setter for public.jobrunr_jobs_stats.scheduled. */ public void setScheduled(Long value) { - set(2, value); + set(1, value); } /** * Getter for public.jobrunr_jobs_stats.scheduled. */ public Long getScheduled() { - return (Long) get(2); + return (Long) get(1); } /** * Setter for public.jobrunr_jobs_stats.enqueued. */ public void setEnqueued(Long value) { - set(3, value); + set(2, value); } /** * Getter for public.jobrunr_jobs_stats.enqueued. */ public Long getEnqueued() { - return (Long) get(3); + return (Long) get(2); } /** * Setter for public.jobrunr_jobs_stats.processing. */ public void setProcessing(Long value) { - set(4, value); + set(3, value); } /** * Getter for public.jobrunr_jobs_stats.processing. */ public Long getProcessing() { - return (Long) get(4); + return (Long) get(3); } /** * Setter for public.jobrunr_jobs_stats.failed. */ public void setFailed(Long value) { - set(5, value); + set(4, value); } /** * Getter for public.jobrunr_jobs_stats.failed. */ public Long getFailed() { - return (Long) get(5); + return (Long) get(4); } /** * Setter for public.jobrunr_jobs_stats.succeeded. */ public void setSucceeded(Long value) { - set(6, value); + set(5, value); } /** * Getter for public.jobrunr_jobs_stats.succeeded. */ public Long getSucceeded() { - return (Long) get(6); + return (Long) get(5); } /** * Setter for public.jobrunr_jobs_stats.alltimesucceeded. */ - public void setAlltimesucceeded(Long value) { - set(7, value); + public void setAlltimesucceeded(BigDecimal value) { + set(6, value); } /** * Getter for public.jobrunr_jobs_stats.alltimesucceeded. */ - public Long getAlltimesucceeded() { - return (Long) get(7); + public BigDecimal getAlltimesucceeded() { + return (BigDecimal) get(6); } /** * Setter for public.jobrunr_jobs_stats.deleted. */ public void setDeleted(Long value) { - set(8, value); + set(7, value); } /** * Getter for public.jobrunr_jobs_stats.deleted. */ public Long getDeleted() { - return (Long) get(8); + return (Long) get(7); } /** - * Setter for public.jobrunr_jobs_stats.nbrofbackgroundjobservers. + * Setter for + * public.jobrunr_jobs_stats.nbrofbackgroundjobservers. */ public void setNbrofbackgroundjobservers(Long value) { - set(9, value); + set(8, value); } /** - * Getter for public.jobrunr_jobs_stats.nbrofbackgroundjobservers. + * Getter for + * public.jobrunr_jobs_stats.nbrofbackgroundjobservers. */ public Long getNbrofbackgroundjobservers() { - return (Long) get(9); + return (Long) get(8); } /** * Setter for public.jobrunr_jobs_stats.nbrofrecurringjobs. */ public void setNbrofrecurringjobs(Long value) { - set(10, value); + set(9, value); } /** * Getter for public.jobrunr_jobs_stats.nbrofrecurringjobs. */ public Long getNbrofrecurringjobs() { - return (Long) get(10); + return (Long) get(9); } // ------------------------------------------------------------------------- - // Record11 type implementation + // Record10 type implementation // ------------------------------------------------------------------------- @Override - public Row11 fieldsRow() { - return (Row11) super.fieldsRow(); + public Row10 fieldsRow() { + return (Row10) super.fieldsRow(); } @Override - public Row11 valuesRow() { - return (Row11) super.valuesRow(); + public Row10 valuesRow() { + return (Row10) super.valuesRow(); } @Override @@ -194,51 +184,46 @@ public Field field1() { @Override public Field field2() { - return JobrunrJobsStats.JOBRUNR_JOBS_STATS.AWAITING; - } - - @Override - public Field field3() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.SCHEDULED; } @Override - public Field field4() { + public Field field3() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.ENQUEUED; } @Override - public Field field5() { + public Field field4() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.PROCESSING; } @Override - public Field field6() { + public Field field5() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.FAILED; } @Override - public Field field7() { + public Field field6() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.SUCCEEDED; } @Override - public Field field8() { + public Field field7() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.ALLTIMESUCCEEDED; } @Override - public Field field9() { + public Field field8() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.DELETED; } @Override - public Field field10() { + public Field field9() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.NBROFBACKGROUNDJOBSERVERS; } @Override - public Field field11() { + public Field field10() { return JobrunrJobsStats.JOBRUNR_JOBS_STATS.NBROFRECURRINGJOBS; } @@ -249,51 +234,46 @@ public Long component1() { @Override public Long component2() { - return getAwaiting(); - } - - @Override - public Long component3() { return getScheduled(); } @Override - public Long component4() { + public Long component3() { return getEnqueued(); } @Override - public Long component5() { + public Long component4() { return getProcessing(); } @Override - public Long component6() { + public Long component5() { return getFailed(); } @Override - public Long component7() { + public Long component6() { return getSucceeded(); } @Override - public Long component8() { + public BigDecimal component7() { return getAlltimesucceeded(); } @Override - public Long component9() { + public Long component8() { return getDeleted(); } @Override - public Long component10() { + public Long component9() { return getNbrofbackgroundjobservers(); } @Override - public Long component11() { + public Long component10() { return getNbrofrecurringjobs(); } @@ -304,51 +284,46 @@ public Long value1() { @Override public Long value2() { - return getAwaiting(); - } - - @Override - public Long value3() { return getScheduled(); } @Override - public Long value4() { + public Long value3() { return getEnqueued(); } @Override - public Long value5() { + public Long value4() { return getProcessing(); } @Override - public Long value6() { + public Long value5() { return getFailed(); } @Override - public Long value7() { + public Long value6() { return getSucceeded(); } @Override - public Long value8() { + public BigDecimal value7() { return getAlltimesucceeded(); } @Override - public Long value9() { + public Long value8() { return getDeleted(); } @Override - public Long value10() { + public Long value9() { return getNbrofbackgroundjobservers(); } @Override - public Long value11() { + public Long value10() { return getNbrofrecurringjobs(); } @@ -360,66 +335,60 @@ public JobrunrJobsStatsRecord value1(Long value) { @Override public JobrunrJobsStatsRecord value2(Long value) { - setAwaiting(value); - return this; - } - - @Override - public JobrunrJobsStatsRecord value3(Long value) { setScheduled(value); return this; } @Override - public JobrunrJobsStatsRecord value4(Long value) { + public JobrunrJobsStatsRecord value3(Long value) { setEnqueued(value); return this; } @Override - public JobrunrJobsStatsRecord value5(Long value) { + public JobrunrJobsStatsRecord value4(Long value) { setProcessing(value); return this; } @Override - public JobrunrJobsStatsRecord value6(Long value) { + public JobrunrJobsStatsRecord value5(Long value) { setFailed(value); return this; } @Override - public JobrunrJobsStatsRecord value7(Long value) { + public JobrunrJobsStatsRecord value6(Long value) { setSucceeded(value); return this; } @Override - public JobrunrJobsStatsRecord value8(Long value) { + public JobrunrJobsStatsRecord value7(BigDecimal value) { setAlltimesucceeded(value); return this; } @Override - public JobrunrJobsStatsRecord value9(Long value) { + public JobrunrJobsStatsRecord value8(Long value) { setDeleted(value); return this; } @Override - public JobrunrJobsStatsRecord value10(Long value) { + public JobrunrJobsStatsRecord value9(Long value) { setNbrofbackgroundjobservers(value); return this; } @Override - public JobrunrJobsStatsRecord value11(Long value) { + public JobrunrJobsStatsRecord value10(Long value) { setNbrofrecurringjobs(value); return this; } @Override - public JobrunrJobsStatsRecord values(Long value1, Long value2, Long value3, Long value4, Long value5, Long value6, Long value7, Long value8, Long value9, Long value10, Long value11) { + public JobrunrJobsStatsRecord values(Long value1, Long value2, Long value3, Long value4, Long value5, Long value6, BigDecimal value7, Long value8, Long value9, Long value10) { value1(value1); value2(value2); value3(value3); @@ -430,7 +399,6 @@ public JobrunrJobsStatsRecord values(Long value1, Long value2, Long value3, Long value8(value8); value9(value9); value10(value10); - value11(value11); return this; } @@ -448,11 +416,10 @@ public JobrunrJobsStatsRecord() { /** * Create a detached, initialised JobrunrJobsStatsRecord */ - public JobrunrJobsStatsRecord(Long total, Long awaiting, Long scheduled, Long enqueued, Long processing, Long failed, Long succeeded, Long alltimesucceeded, Long deleted, Long nbrofbackgroundjobservers, Long nbrofrecurringjobs) { + public JobrunrJobsStatsRecord(Long total, Long scheduled, Long enqueued, Long processing, Long failed, Long succeeded, BigDecimal alltimesucceeded, Long deleted, Long nbrofbackgroundjobservers, Long nbrofrecurringjobs) { super(JobrunrJobsStats.JOBRUNR_JOBS_STATS); setTotal(total); - setAwaiting(awaiting); setScheduled(scheduled); setEnqueued(enqueued); setProcessing(processing); @@ -462,5 +429,6 @@ public JobrunrJobsStatsRecord(Long total, Long awaiting, Long scheduled, Long en setDeleted(deleted); setNbrofbackgroundjobservers(nbrofbackgroundjobservers); setNbrofrecurringjobs(nbrofrecurringjobs); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMetadataRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMetadataRecord.java index ea28532dc..34b9a236d 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMetadataRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMetadataRecord.java @@ -289,5 +289,6 @@ public JobrunrMetadataRecord(String id, String name, String owner, String value, setValue(value); setCreatedat(createdat); setUpdatedat(updatedat); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMigrationsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMigrationsRecord.java index e6ca4038b..c0c798d2a 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMigrationsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrMigrationsRecord.java @@ -176,5 +176,6 @@ public JobrunrMigrationsRecord(String id, String script, String installedon) { setId(id); setScript(script); setInstalledon(installedon); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrRecurringJobsRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrRecurringJobsRecord.java index a7b29a751..94d4c69aa 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrRecurringJobsRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/JobrunrRecurringJobsRecord.java @@ -7,8 +7,8 @@ import org.eclipse.openvsx.jooq.tables.JobrunrRecurringJobs; import org.jooq.Field; import org.jooq.Record1; -import org.jooq.Record3; -import org.jooq.Row3; +import org.jooq.Record4; +import org.jooq.Row4; import org.jooq.impl.UpdatableRecordImpl; @@ -16,7 +16,7 @@ * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class JobrunrRecurringJobsRecord extends UpdatableRecordImpl implements Record3 { +public class JobrunrRecurringJobsRecord extends UpdatableRecordImpl implements Record4 { private static final long serialVersionUID = 1L; @@ -62,6 +62,20 @@ public String getJobasjson() { return (String) get(2); } + /** + * Setter for public.jobrunr_recurring_jobs.createdat. + */ + public void setCreatedat(Long value) { + set(3, value); + } + + /** + * Getter for public.jobrunr_recurring_jobs.createdat. + */ + public Long getCreatedat() { + return (Long) get(3); + } + // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- @@ -72,17 +86,17 @@ public Record1 key() { } // ------------------------------------------------------------------------- - // Record3 type implementation + // Record4 type implementation // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { - return (Row3) super.fieldsRow(); + public Row4 fieldsRow() { + return (Row4) super.fieldsRow(); } @Override - public Row3 valuesRow() { - return (Row3) super.valuesRow(); + public Row4 valuesRow() { + return (Row4) super.valuesRow(); } @Override @@ -100,6 +114,11 @@ public Field field3() { return JobrunrRecurringJobs.JOBRUNR_RECURRING_JOBS.JOBASJSON; } + @Override + public Field field4() { + return JobrunrRecurringJobs.JOBRUNR_RECURRING_JOBS.CREATEDAT; + } + @Override public String component1() { return getId(); @@ -115,6 +134,11 @@ public String component3() { return getJobasjson(); } + @Override + public Long component4() { + return getCreatedat(); + } + @Override public String value1() { return getId(); @@ -130,6 +154,11 @@ public String value3() { return getJobasjson(); } + @Override + public Long value4() { + return getCreatedat(); + } + @Override public JobrunrRecurringJobsRecord value1(String value) { setId(value); @@ -149,10 +178,17 @@ public JobrunrRecurringJobsRecord value3(String value) { } @Override - public JobrunrRecurringJobsRecord values(String value1, Integer value2, String value3) { + public JobrunrRecurringJobsRecord value4(Long value) { + setCreatedat(value); + return this; + } + + @Override + public JobrunrRecurringJobsRecord values(String value1, Integer value2, String value3, Long value4) { value1(value1); value2(value2); value3(value3); + value4(value4); return this; } @@ -170,11 +206,13 @@ public JobrunrRecurringJobsRecord() { /** * Create a detached, initialised JobrunrRecurringJobsRecord */ - public JobrunrRecurringJobsRecord(String id, Integer version, String jobasjson) { + public JobrunrRecurringJobsRecord(String id, Integer version, String jobasjson, Long createdat) { super(JobrunrRecurringJobs.JOBRUNR_RECURRING_JOBS); setId(id); setVersion(version); setJobasjson(jobasjson); + setCreatedat(createdat); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/MigrationItemRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/MigrationItemRecord.java index 67a0b5a23..6a3662463 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/MigrationItemRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/MigrationItemRecord.java @@ -213,5 +213,6 @@ public MigrationItemRecord(Long id, String migrationScript, Long entityId, Boole setMigrationScript(migrationScript); setEntityId(entityId); setMigrationScheduled(migrationScheduled); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceMembershipRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceMembershipRecord.java index 3185560ec..144261434 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceMembershipRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceMembershipRecord.java @@ -213,5 +213,6 @@ public NamespaceMembershipRecord(Long id, String role, Long namespace, Long user setRole(role); setNamespace(namespace); setUserData(userData); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceRecord.java index 0ff42e648..0dab310f8 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceRecord.java @@ -435,5 +435,6 @@ public NamespaceRecord(Long id, String name, String publicId, String displayName setLogoName(logoName); setLogoBytes(logoBytes); setLogoStorageType(logoStorageType); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceSocialLinksRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceSocialLinksRecord.java index 01dc419e8..f2517ba8a 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceSocialLinksRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/NamespaceSocialLinksRecord.java @@ -166,5 +166,6 @@ public NamespaceSocialLinksRecord(Long namespaceId, String provider, String soci setNamespaceId(namespaceId); setProvider(provider); setSocialLink(socialLink); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersistedLogRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersistedLogRecord.java index e26caf4ff..fa7141319 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersistedLogRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersistedLogRecord.java @@ -215,5 +215,6 @@ public PersistedLogRecord(Long id, LocalDateTime timestamp, Long userData, Strin setTimestamp(timestamp); setUserData(userData); setMessage(message); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersonalAccessTokenRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersonalAccessTokenRecord.java index 508d88391..c7d23105c 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersonalAccessTokenRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/PersonalAccessTokenRecord.java @@ -326,5 +326,6 @@ public PersonalAccessTokenRecord(Long id, LocalDateTime accessedTimestamp, Boole setDescription(description); setValue(value); setUserData(userData); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ShedlockRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ShedlockRecord.java index 18ee61deb..234c922c2 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ShedlockRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/ShedlockRecord.java @@ -215,5 +215,6 @@ public ShedlockRecord(String name, LocalDateTime lockUntil, LocalDateTime locked setLockUntil(lockUntil); setLockedAt(lockedAt); setLockedBy(lockedBy); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SignatureKeyPairRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SignatureKeyPairRecord.java index e41b82c6a..e035b22a7 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SignatureKeyPairRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SignatureKeyPairRecord.java @@ -289,5 +289,6 @@ public SignatureKeyPairRecord(Long id, String publicId, byte[] privateKey, Strin setPublicKeyText(publicKeyText); setCreated(created); setActive(active); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionAttributesRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionAttributesRecord.java index c1fa13742..d899c7342 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionAttributesRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionAttributesRecord.java @@ -21,14 +21,16 @@ public class SpringSessionAttributesRecord extends UpdatableRecordImplpublic.spring_session_attributes.session_primary_id. + * Setter for + * public.spring_session_attributes.session_primary_id. */ public void setSessionPrimaryId(String value) { set(0, value); } /** - * Getter for public.spring_session_attributes.session_primary_id. + * Getter for + * public.spring_session_attributes.session_primary_id. */ public String getSessionPrimaryId() { return (String) get(0); @@ -176,5 +178,6 @@ public SpringSessionAttributesRecord(String sessionPrimaryId, String attributeNa setSessionPrimaryId(sessionPrimaryId); setAttributeName(attributeName); setAttributeBytes(attributeBytes); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionRecord.java index c21baf79f..4024a50e1 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/SpringSessionRecord.java @@ -324,5 +324,6 @@ public SpringSessionRecord(String primaryId, String sessionId, Long creationTime setMaxInactiveInterval(maxInactiveInterval); setExpiryTime(expiryTime); setPrincipalName(principalName); + resetChangedOnNotNull(); } } diff --git a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/UserDataRecord.java b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/UserDataRecord.java index bb4f8c8fd..6f849a003 100644 --- a/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/UserDataRecord.java +++ b/server/src/main/jooq-gen/org/eclipse/openvsx/jooq/tables/records/UserDataRecord.java @@ -509,5 +509,6 @@ public UserDataRecord(Long id, String avatarUrl, String email, String fullName, setEclipseData(eclipseData); setEclipseToken(eclipseToken); setGithubToken(githubToken); + resetChangedOnNotNull(); } } diff --git a/server/src/main/resources/db/migration/V1_42__Simplify_Admin_Stats.sql b/server/src/main/resources/db/migration/V1_42__Simplify_Admin_Stats.sql new file mode 100644 index 000000000..4dd586dc9 --- /dev/null +++ b/server/src/main/resources/db/migration/V1_42__Simplify_Admin_Stats.sql @@ -0,0 +1,16 @@ +DROP TRIGGER extension_active_insert ON extension; +DROP TRIGGER extension_review_active_insert ON extension_review; +DROP TRIGGER extension_version_active_insert ON extension_version; +DROP TRIGGER personal_access_token_active_insert ON personal_access_token; +DROP TRIGGER extension_active_update ON extension; +DROP TRIGGER extension_review_active_update ON extension_review; +DROP TRIGGER extension_version_active_update ON extension_version; +DROP TRIGGER personal_access_token_active_update ON personal_access_token; +DROP TRIGGER extension_delete_entity_active_state ON extension; +DROP TRIGGER extension_review_delete_entity_active_state ON extension_review; +DROP TRIGGER extension_version_delete_entity_active_state ON extension_version; +DROP TRIGGER personal_access_token_delete_entity_active_state ON personal_access_token; +DROP FUNCTION public.insert_entity_active_state; + +DROP TABLE entity_active_state; +DROP TABLE download; \ No newline at end of file diff --git a/server/src/test/java/org/eclipse/openvsx/repositories/RepositoryServiceSmokeTest.java b/server/src/test/java/org/eclipse/openvsx/repositories/RepositoryServiceSmokeTest.java index 9f4fb9f87..19b1b03d2 100644 --- a/server/src/test/java/org/eclipse/openvsx/repositories/RepositoryServiceSmokeTest.java +++ b/server/src/test/java/org/eclipse/openvsx/repositories/RepositoryServiceSmokeTest.java @@ -78,21 +78,20 @@ void testExecuteQueries() { repositories = Mockito.spy(repositories); assertAll( - () -> repositories.averageNumberOfActiveReviewsPerActiveExtension(NOW), - () -> repositories.countActiveExtensionPublishers(NOW), - () -> repositories.countActiveExtensionPublishersGroupedByExtensionsPublished(NOW), - () -> repositories.countActiveExtensions(NOW), - () -> repositories.countActiveExtensionsGroupedByExtensionReviewRating(NOW), + () -> repositories.averageNumberOfActiveReviewsPerActiveExtension(), + () -> repositories.countActiveExtensionPublishers(), + () -> repositories.countActiveExtensionPublishersGroupedByExtensionsPublished(), + () -> repositories.countActiveExtensions(), + () -> repositories.countActiveExtensionsGroupedByExtensionReviewRating(), () -> repositories.countActiveReviews(null), () -> repositories.countExtensions(), () -> repositories.countExtensions("name", "namespace"), () -> repositories.countMemberships(namespace, "role"), () -> repositories.isVerified(namespace, userData), () -> repositories.countNamespaces(), - () -> repositories.countPublishersThatClaimedNamespaceOwnership(NOW), + () -> repositories.countPublishersThatClaimedNamespaceOwnership(), () -> repositories.countUsers(), - () -> repositories.downloadsBetween(NOW, NOW), - () -> repositories.downloadsUntil(NOW), + () -> repositories.downloadsTotal(), () -> repositories.findAccessToken("value"), () -> repositories.findAccessToken(1L), () -> repositories.findAccessTokens(userData), @@ -142,7 +141,7 @@ void testExecuteQueries() { () -> repositories.findExtensions(userData), () -> repositories.findFilesByType(List.of(extVersion), STRING_LIST), () -> repositories.countVersions(extension), - () -> repositories.topMostDownloadedExtensions(NOW, 1), + () -> repositories.topMostDownloadedExtensions(1), () -> repositories.deleteFileResources(extVersion, "download"), () -> repositories.countActiveAccessTokens(userData), () -> repositories.findNotMigratedResources(), @@ -151,9 +150,9 @@ void testExecuteQueries() { () -> repositories.findNotMigratedVsixManifests(), () -> repositories.findNotMigratedTargetPlatforms(), () -> repositories.findNotMigratedSha256Checksums(), - () -> repositories.topMostActivePublishingUsers(NOW, 1), - () -> repositories.topNamespaceExtensions(NOW, 1), - () -> repositories.topNamespaceExtensionVersions(NOW, 1), + () -> repositories.topMostActivePublishingUsers(1), + () -> repositories.topNamespaceExtensions(1), + () -> repositories.topNamespaceExtensionVersions(1), () -> repositories.findFileResourcesByExtensionVersionIdAndType(LONG_LIST, STRING_LIST), () -> repositories.findActiveExtensionVersionsByVersion("version", "extensionName", "namespaceName"), () -> repositories.findResourceFileResources(1L, "prefix"),