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

Feature: generated keys #170

Merged
merged 16 commits into from
Feb 24, 2024
Merged

Feature: generated keys #170

merged 16 commits into from
Feb 24, 2024

Conversation

rainbowdashlabs
Copy link
Owner

No description provided.

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>.
@rainbowdashlabs rainbowdashlabs merged commit 9a76d9b into dev Feb 24, 2024
2 checks passed
@rainbowdashlabs rainbowdashlabs deleted the feature/generated-keys branch February 24, 2024 11:52
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