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

feat(opts): Adding with and join string methods #102

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

Jacobbrewer1
Copy link
Owner

Describe your changes

This pull request introduces new functionalities to simplify the creation of SQL statements by adding string-based options for WHERE and JOIN clauses. Additionally, it includes corresponding tests to ensure the new functionalities work as expected.

New functionalities:

  • joiner.go: Added joinStringOption type and Join method to support string-based JOIN clauses.
  • patch_opts.go: Added WithWhereStr and WithJoinStr functions to set WHERE and JOIN clauses using strings and arguments.
  • wherer.go: Added whereStringOption type and Where method to support string-based WHERE clauses.

Tests:

  • sql_test.go: Added TestNewSQLPatch_WhereString and TestNewSQLPatch_JoinString to test WithWhereStr and WithJoinStr functionalities.
  • sql_test.go: Added TestGenerateSQL_Success_WhereString and TestGenerateSQL_Success_JoinString to validate the generation of SQL statements using the new string-based options.

@Jacobbrewer1 Jacobbrewer1 enabled auto-merge (squash) January 30, 2025 13:50
@Jacobbrewer1 Jacobbrewer1 changed the title Adding with and join string methods feat(opts): Adding with and join string methods Jan 30, 2025
@Jacobbrewer1 Jacobbrewer1 merged commit e7eede8 into main Jan 30, 2025
5 checks passed
@Jacobbrewer1 Jacobbrewer1 deleted the feat/where-join-strings branch January 30, 2025 13:55
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