-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor/2024 08 modification codec #291
Merged
takapi327
merged 72 commits into
master
from
revert-290-revert-285-refactor/2024-08-Modification-Codec
Sep 27, 2024
Merged
Refactor/2024 08 modification codec #291
takapi327
merged 72 commits into
master
from
revert-290-revert-285-refactor/2024-08-Modification-Codec
Sep 27, 2024
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
takapi327
added
🔧 refactor
Refactoring
project:queryBuilder
Addition and modification of functionality to Query Builder projects
project:dsl
Addition and modification of functionality to DSL projects
labels
Sep 9, 2024
…vert-285-refactor/2024-08-Modification-Codec
takapi327
commented
Sep 12, 2024
module/ldbc-query-builder/src/main/scala/ldbc/query/builder/Table.scala
Outdated
Show resolved
Hide resolved
…vert-285-refactor/2024-08-Modification-Codec
takapi327
deleted the
revert-290-revert-285-refactor/2024-08-Modification-Codec
branch
September 27, 2024 14:24
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
project:dsl
Addition and modification of functionality to DSL projects
project:queryBuilder
Addition and modification of functionality to Query Builder projects
🔧 refactor
Refactoring
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.
Implementation Details
Encoder
Change from Parameter to Encoder for dynamic embedding in query strings.
This eliminates the need for the user to write a redundant process to receive the Effect Type, and allows for simpler implementation and use of custom data types as parameters.
Before
After
Encoder's encoding process can only return Scala types that can be handled by PreparedStatement.
The following types are supported at this time.
Decoder
Change the process of getting data from ResultSet from ResultSetReader to Decoder.
This allows users to convert retrieved records into nested hierarchical data.
Using Query Builder
Custom type decoding
Decoding of custom types will change from ResultSetReader to the following
Before
After
Breaking Change
When using
selectAll
in a query built with Query Builder, the type that could be obtained withquery
was a Tuple type consisting of all records in the selected table. Therefore, conversion to the model corresponding to the table had to be done explicitly usingqueryTo
.This was redundant, and if the user wanted to retrieve all the records, the application would have taken that model as the income.
Therefore, the change has been made so that selections made with
selectAll
are converted directly into models whenquery
is used. If you useselect
to retrieve only specific records, thequery
will still be of type Tuple. Conversion to the specified model can still be done usingqueryTo
.Before
After
Fixes
Fixes #xxxxx
Pull Request Checklist
References