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 12 migrate table name designation to derived #337

Merged

Conversation

takapi327
Copy link
Owner

@takapi327 takapi327 commented Dec 16, 2024

Implementation Details

The method of specifying the table name using query builder has been changed from passing it as an argument of TableQuery to passing it as an argument of Table's derived.

Before

case class City(
  id: Int,
  name:             String,
  countryCode:      String,
  district:         String,
  population:       Int
) derives Table

val table = TableQuery[Test]("city")

After

case class City(
  id: Int,
  name:             String,
  countryCode:      String,
  district:         String,
  population:       Int
)

object City:
  given Table[City] = Table.derived[City]("city")

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 labels Dec 16, 2024
@takapi327 takapi327 added this to the 0.3.0 milestone Dec 16, 2024
@takapi327 takapi327 self-assigned this Dec 16, 2024
@takapi327 takapi327 merged commit 07414fc into master Dec 16, 2024
27 checks passed
@takapi327 takapi327 deleted the refactor/2024-12-Migrate-Table-name-designation-to-Derived branch December 16, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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