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

Refactor/2024 08 modification codec #285

Merged
merged 18 commits into from
Sep 9, 2024

Conversation

takapi327
Copy link
Owner

@takapi327 takapi327 commented Aug 31, 2024

Implementation Details

Change the process of getting data from ResultSet from ResultSetReader to Decoder.

This allows users to convert retrieved records into nested hierarchical data.

case class Value1(p1: Int, p2: Int)
case class Value2(p3: Int, p4: Int)
case class Row(v1: Value1, v2: Value2)

sql"SELECT `p1`, `p2`, `p3`, `p4` FROM `table`".query[(Int, Int, Int, Int)].to[List]
sql"SELECT `p1`, `p2`, `p3`, `p4` FROM `table`".query[((Int, Int), (Int, Int))].to[List]
sql"SELECT `p1`, `p2`, `p3`, `p4` FROM `table`".query[(Value1, Value2)].to[List]
sql"SELECT `p1`, `p2`, `p3`, `p4` FROM `table`".query[(Int, Int, Value2)].to[List]
sql"SELECT `p1`, `p2`, `p3`, `p4` FROM `table`".query[Row].to[List]

Fixes

Fixes #xxxxx

Pull Request Checklist

  • Wrote unit and integration tests
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code formatting by scalafmt (sbt scalafmtAll command execution)
  • Add copyright headers to new files

References

@takapi327 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 Aug 31, 2024
@takapi327 takapi327 added this to the 0.3.0 milestone Aug 31, 2024
@takapi327 takapi327 self-assigned this Aug 31, 2024
@takapi327 takapi327 merged commit 86631ab into master Sep 9, 2024
11 of 25 checks passed
@takapi327 takapi327 deleted the refactor/2024-08-Modification-Codec branch September 9, 2024 15:55
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant