Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore storage test #5280

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
* A SQL implementation of the {@link RegistryStorage} interface. This impl does not use any ORM technology -
* it simply uses native SQL for all operations.
*/
public abstract class AbstractSqlRegistryStorage implements RegistryStorage {

Check warning on line 155 in app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java

View workflow job for this annotation

GitHub Actions / Qodana

Overly complex class

Overly complex class `AbstractSqlRegistryStorage` (cyclomatic complexity = 433)

private static int DB_VERSION = Integer
.valueOf(IoUtil.toString(AbstractSqlRegistryStorage.class.getResourceAsStream("db-version")))
Expand Down Expand Up @@ -1485,11 +1485,11 @@
}

@Override
public VersionSearchResultsDto searchVersions(Set<SearchFilter> filters, OrderBy orderBy,

Check warning on line 1488 in app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java

View workflow job for this annotation

GitHub Actions / Qodana

Overly complex method

Overly complex method `searchVersions()` (cyclomatic complexity = 24)

Check warning on line 1488 in app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java

View workflow job for this annotation

GitHub Actions / Qodana

Overly long method

`searchVersions` is too long (# Non-comment source statements = 121)
OrderDirection orderDirection, int offset, int limit) throws RegistryStorageException {

log.debug("Searching for versions");
return handles.withHandleNoException(handle -> {

Check warning on line 1492 in app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java

View workflow job for this annotation

GitHub Actions / Qodana

Overly long lambda expression

Lambda expression is too long (# Non-comment source statements = 119)
List<SqlStatementVariableBinder> binders = new LinkedList<>();
String op;

Expand Down Expand Up @@ -1588,6 +1588,9 @@
case globalId:
orderByQuery.append(" ORDER BY v.globalId");
break;
case groupId:
orderByQuery.append(" ORDER BY v.groupId");
break;
case version:
orderByQuery.append(" ORDER BY v.version");
break;
Expand Down Expand Up @@ -2651,6 +2654,7 @@
where.append(" AND l.groupId = g.groupId)");
break;
default:

break;
}
where.append(")");
Expand Down
Loading
Loading