-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature: generated keys #170
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The CalledSingletonQuery and CalledBatchQuery classes have been updated to use the new insertion result classes. Added methods for inserted row retrieval in both classes. Also, the return types of certain operations have been modified to provide finer granularity and clearer intent.
Two new interfaces, InsertionResult and InsertionBatchResult, have been created within the path de.chojo.sadu.queries.api.results.writing.insertion. These interfaces extend ManipulationResult and ManipulationBatchResult classes respectively. Both interfaces provide a function to retrieve the keys of inserted rows.
The ManipulationBatchResult and ManipulationResult interfaces have been moved to a new subpackage 'manipulation' under 'writing' package. Additionally, the ManipulationBatchResult interface has been modified to now include a generic parameter for greater flexibility.
The result interfaces have been refactored, dividing ManipulationBatchResult and ManipulationResult into separate subpackages. Methods for inserting data have been also modified to include support for getting generated keys post insertion, improving user experience.
The package structure has been refactored by moving ManipulationBatchQuery and ManipulationResultImpl classes into a new 'manipulation' sub-package. Classes were also renamed to ManipulationBatchResultImpl and ManipulationResultImpl, reflecting their actual functionality. This change aims to create a more logical and understandable code structure.
Two new classes named `InsertionBatchResultImpl` and `InsertionResultImpl` have been added to the 'insertion' sub-package of 'sadu-queries'. These classes extend `ManipulationBatchResultImpl` and `ManipulationResultImpl` respectively, providing functionality for managing batch insertion results, including extraction of keys. These additions enhance the handling of batch insertion results in the project.
The exported writing packages in the 'sadu-queries' module have been split into 'manipulation' and 'insertion' sub-packages. This reorganization serves to better partition the module's functionality by separating results writing related to 'manipulation' and 'insertion'. This change brings more clarity to the code structure and makes it easier to locate specific functionality.
Added a new ‘generatedKeys’ method in the Results class which retrieves and returns generated keys from a SQL statement execution. This method is used to process auto-generated keys from SQL insertions, enhancing efficiency and providing a systematic way to handle these keys.
The import path for the ManipulationResult class has been updated in multiple Java files to reflect its new location within the 'manipulation' package. The affected files include ReadTest.java, TransactionTest.java, and WriteTest.java. This change aligns with the recent reorganization of directories in the codebase.
This commit updates and adds detailed comments to the InsertionResult, InsertionBatchResult, and ManipulationBatchResult interfaces within the sadu-queries package. Additionally, new package-info.java files have been added for the 'insertion' and 'manipulation' packages, providing more specific information regarding their functionality.
The commit updates several classes in the sadu-queries package, InsertionResult, InsertionBatchResult, InsertionBatchResultImpl, and InsertionResultImpl by adding SPDX-License-Identifier notice and Copyright notices at the beginning of the files.
Unused TODO comment regarding returning generated keys was removed from the CalledBatchQueryImpl class. This change helps to keep the codebase clean from unnecessary or outdated comments.
Changed usage of ManipulationBatchResult to InsertionBatchResult<InsertionResult> in various test cases in WriteTest class. This aligns with recent API changes and allows testing for new insert-and-get-keys capability. This commit also adds a new test exampleGetKeys() to verify the retrieval of keys after insertions.
The return types of insert() and insertAndGetKeys() have been updated to InsertionBatchResult<InsertionResult> in CalledBatchQuery.java file. This change aligns these methods with recent updates in the API.
Switched from using the ManipulationResult type to the InsertionResult type in the exampleSingle method of the WriteTest class. This aligns with the recent changes made in the CalledBatchQuery.java file where the return types of insert() and insertAndGetKeys() methods were updated to InsertionBatchResult<InsertionResult>.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.