diff --git a/core/src/main/java/org/polypheny/db/languages/LanguageManager.java b/core/src/main/java/org/polypheny/db/languages/LanguageManager.java index a07cce867c..a0d1830cd5 100644 --- a/core/src/main/java/org/polypheny/db/languages/LanguageManager.java +++ b/core/src/main/java/org/polypheny/db/languages/LanguageManager.java @@ -84,9 +84,17 @@ public static void removeQueryLanguage( String name ) { public List anyPrepareQuery( QueryContext context, Transaction transaction ) { - Statement statement = transaction.createStatement(); + return anyPrepareQuery( context, transaction.createStatement() ); + } + + + // This method is still called from the Avatica interface and leaves the statement management to the caller. + // This should be refactored to use the new method only transmitting the transaction as soon as the + // new prism interface is enabled + public List anyPrepareQuery( QueryContext context, Statement statement ) { + Transaction transaction = statement.getTransaction(); if ( transaction.isAnalyze() ) { - context.getInformationTarget().accept( transaction.getQueryAnalyzer() ); + context.getInformationTarget().accept( statement.getTransaction().getQueryAnalyzer() ); } if ( transaction.isAnalyze() ) { diff --git a/plugins/avatica-interface/src/main/java/org/polypheny/db/avatica/DbmsMeta.java b/plugins/avatica-interface/src/main/java/org/polypheny/db/avatica/DbmsMeta.java index 904f65502c..9d8f8a099e 100644 --- a/plugins/avatica-interface/src/main/java/org/polypheny/db/avatica/DbmsMeta.java +++ b/plugins/avatica-interface/src/main/java/org/polypheny/db/avatica/DbmsMeta.java @@ -1334,7 +1334,7 @@ private void prepare( StatementHandle h, String sql ) throws NoSuchStatementExce .transactionManager( transactionManager ) .build(); - PolySignature signature = PolySignature.from( LanguageManager.getINSTANCE().anyPrepareQuery( context, statementHandle.getStatement().getTransaction() ).get( 0 ) ); + PolySignature signature = PolySignature.from( LanguageManager.getINSTANCE().anyPrepareQuery( context, statementHandle.getStatement() ).get( 0 ) ); h.signature = signature; statementHandle.setSignature( signature ); diff --git a/webui/src/main/java/org/polypheny/db/webui/HttpServer.java b/webui/src/main/java/org/polypheny/db/webui/HttpServer.java index f290c9bfd3..21b7001d05 100644 --- a/webui/src/main/java/org/polypheny/db/webui/HttpServer.java +++ b/webui/src/main/java/org/polypheny/db/webui/HttpServer.java @@ -264,7 +264,7 @@ private void attachRoutes( Javalin webuiServer, Crud crud ) { webuiServer.get( "/getAvailableSources", crud::getAvailableSources ); - webuiServer.post( "/createStore", crud::addAdapter ); + webuiServer.post( "/createAdapter", crud::addAdapter ); webuiServer.post( "/pathAccess", crud::startAccessRequest );