Skip to content

Conversation

@fygo97
Copy link
Collaborator

@fygo97 fygo97 commented Oct 1, 2025

This PR contains all Java functionality of the Matlab connector to support SQL and Mongo (including JUnit Tests ensuring predictable behaviour). The Matlab wrapper already admits full SQL support, Mongo support in the wrapper will follow shortly.

fygo97 and others added 30 commits August 19, 2025 03:32
…ore the .jar files were included, launch.json and settings.json were set up. Documentation still needs some last tweaks.
… conversion from Java type to Matlab type in a small matlab wrapper because matlab.engine can't properly and reliably inject variables into the users matlab session. So I need to handle it in a wrapper. Also fixed several tiny mistakes and modified QueryExecutor.java in how it handles the results.
…lly handle the polypheny application, polypheny server connection aswell as the query execution. Queries are returned properly to java.
…including it in the settings.json so VS Code uses it to format. Also deleted unnecessary .jar files.
… determines the connections host and port. 2. Refactored to the Project-own coding conventions. 3. Added Commit and Rollback logic to PolyphenyConnection. 4. Removed the autostart logic from PolyphenyConnection as they should go to the JUnitTests. Adapted the res tof the code accordingly. 5. Added Documentation for the code. 6. Adapted QueryExecutor so only executeQuery takes the lanugage, not the constructor
…ng passes now and the startup works. Publish for the relational part almost ready.
…arameter in query and queryBatch, not in the PolyWrapper. Now it mirrors the Java functionality.
…lemented' when giving language = 'nonsense' vs language = sql, mongoql, cypher.
…ing before the PolyphenyConnection.java object is created when calling the PolyWrapper.m. That way theres no ambiguity or depenendence on any Matlab specific Toolbox features (like automatic install options). Performance is not affected by this since the PolyWrapper object is only called once to establish the connection through the PolyphenyConnection.java class that it mirrors in Matlab.
…turn the number of changed rows for INSERT (and the likes) statements in SQL. Added one test to test the functionality.
…xecute(language, namespace, query) in the matlabfunction. This is necessary so that MongoQL queries can be executed properly.
… the Relational part because the execute() function from the multimodel extension does not expose the needed metadata (for example to get the column names and column rows). In this version SQL works as intended and all SQL tests pass. I also implemented some unfinished changes for the Document part but this was commented out because it still has bugs.
…hSql and executeBatchMongo because these two both need to return different types. SQL must return List<Integer> as it only allows for executeUpdate like operations that return a 'number of columns modified' counter for every query, while Mongo allows both 'executeQuery' and 'executeUpdate' like operation (i.e. both read and write) and so the results are heterogeneous. Therefore the returntype here is List<List<String>> which will then be passed to Matlab to decode using jsondecode
…e the rollback within an exception fails. Before rollback failures would have masked the initial failure reason. Now both the initial failure reaons + rollback failures (if happened) will be caught and propagated to Matlab user.
…y server. Modified the openIfNeeded to not set Autocommit to true.
… All Matlabtests, JUnit Tests now pass. The project is ready for launch of the toolbox version 1.0. Minor changes were made to comments in the java side
… remove some unnecessary files and added the source folder to package the toolbox which generates the PolyphenyConnector.mltbx file (see README.md)
…he polypheny-all.jar and added SQL documentation for the users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant