-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
v6.0.0 #670
Merged
Merged
v6.0.0 #670
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
Updates places where `"id"` was hardcoded instead of using `model.IDField()`.
Add tests for this scenario
This patch adds a feature which enables pop to pass down the connection context to the model's TableName() function by implementing TableName(ctx context.Context) string. The context can be used to dynamically generate tablenames which can be important for prefixed or generic tables and other use cases.
* Reset to development * bumping pgx and pgconn versions Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com>
* Latest from development (#617) * fix: improve model ID field customization (#604) Updates places where `"id"` was hardcoded instead of using `model.IDField()`. * Ensure uninitialized map is initialized when unmarshaling json Add tests for this scenario * exclude migration_table_name from connection string * add test for OptionsString * Add support for pointer FKs when preloading a belongs_to association (#602) * feat: support context-aware tablenames (#614) This patch adds a feature which enables pop to pass down the connection context to the model's TableName() function by implementing TableName(ctx context.Context) string. The context can be used to dynamically generate tablenames which can be important for prefixed or generic tables and other use cases. * Bump pg deps (#616) * Reset to development * bumping pgx and pgconn versions Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> Co-authored-by: Patrik <zepatrik@users.noreply.github.com> Co-authored-by: Michael Montgomery <mmontg1@gmail.com> Co-authored-by: kyrozetera <jasonhale.w@gmail.com> Co-authored-by: Reggie Riser <4960757+reggieriser@users.noreply.github.com> Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> * adding goreleaser syntaz (#619) Co-authored-by: Patrik <zepatrik@users.noreply.github.com> Co-authored-by: Michael Montgomery <mmontg1@gmail.com> Co-authored-by: kyrozetera <jasonhale.w@gmail.com> Co-authored-by: Reggie Riser <4960757+reggieriser@users.noreply.github.com> Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com>
* Resolve MySQL issues and improve test migrations * Bump CockroachDB to maintained and supported versions Version 2.1 has reached EoL in 2019 Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
* update pagination_test
This PR add the possibility to configure the connection maximum idle time (https://golang.org/pkg/database/sql/#DB.SetConnMaxIdleTime). Closes #632 BREAKING CHANGE: Requires Go 1.15 from now on.
- `jackc/pgx` to version `v4.11.0`. - `jmoiron/sqlx` to version`v1.3.3` - `lib/pq` to version`v1.10.1`
* Remove the need to use Tx when loading many to many associations * replace TX access to create a new tx.Store.Transaction() object
Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com>
This patch export some model convenience functions which are useful when constructing queries outside of pop: custom updates, deletes, inserts, ... Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com>
Some SQL logs were missing the values as argument. This adds all places
This allows writing delete queries without knowing the exact primary key or for composite keys. `Destroy` only allows to delete by primary key, but there are many cases where you want to delete multiple rows or by some other query than the ID. See #29
Basically, just reversing the up migration order does not work, as that puts "all" migrations before specific ones. Therefore, I added implemented the proper `Less` function for down migrations explicitly. Related #533 Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
* Updating Pgx (#660) * adding goreleaser syntaz * updating pgx now really * Migrate from packr to fs * Migrate to v6 * Use old build tags * Update error handling * Fix error after rebase * Fix error handling * Fix filenames for embed Go 1.16 usage Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com>
* v5.3.4 (#644) * fix: improve model ID field customization (#604) Updates places where `"id"` was hardcoded instead of using `model.IDField()`. * Ensure uninitialized map is initialized when unmarshaling json Add tests for this scenario * exclude migration_table_name from connection string * add test for OptionsString * Add support for pointer FKs when preloading a belongs_to association (#602) * feat: support context-aware tablenames (#614) This patch adds a feature which enables pop to pass down the connection context to the model's TableName() function by implementing TableName(ctx context.Context) string. The context can be used to dynamically generate tablenames which can be important for prefixed or generic tables and other use cases. * Bump pg deps (#616) * Reset to development * bumping pgx and pgconn versions Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> * Latest from master (#620) * Latest from development (#617) * fix: improve model ID field customization (#604) Updates places where `"id"` was hardcoded instead of using `model.IDField()`. * Ensure uninitialized map is initialized when unmarshaling json Add tests for this scenario * exclude migration_table_name from connection string * add test for OptionsString * Add support for pointer FKs when preloading a belongs_to association (#602) * feat: support context-aware tablenames (#614) This patch adds a feature which enables pop to pass down the connection context to the model's TableName() function by implementing TableName(ctx context.Context) string. The context can be used to dynamically generate tablenames which can be important for prefixed or generic tables and other use cases. * Bump pg deps (#616) * Reset to development * bumping pgx and pgconn versions Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> Co-authored-by: Patrik <zepatrik@users.noreply.github.com> Co-authored-by: Michael Montgomery <mmontg1@gmail.com> Co-authored-by: kyrozetera <jasonhale.w@gmail.com> Co-authored-by: Reggie Riser <4960757+reggieriser@users.noreply.github.com> Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> * adding goreleaser syntaz (#619) Co-authored-by: Patrik <zepatrik@users.noreply.github.com> Co-authored-by: Michael Montgomery <mmontg1@gmail.com> Co-authored-by: kyrozetera <jasonhale.w@gmail.com> Co-authored-by: Reggie Riser <4960757+reggieriser@users.noreply.github.com> Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> * Resolve issues in UPDATE and DELETE when using schemas (#618) * Resolve MySQL issues and improve test migrations * Bump CockroachDB to maintained and supported versions Version 2.1 has reached EoL in 2019 Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Use `PaginatorPageKey` and `PaginatorPerPageKey` variables (#615) * update pagination_test * Pass Time structure into timestamp update functions. (#625) Closes #624 * Allow nullable JSONB and resolve MySQL regression (#639) * Allow passing args to `Order` (#630) * Added connection maximum idle time configuration (#635) This PR add the possibility to configure the connection maximum idle time (https://golang.org/pkg/database/sql/#DB.SetConnMaxIdleTime). Closes #632 BREAKING CHANGE: Requires Go 1.15 from now on. * Bump sqlite to 3.35.4 / 1.14.7 (#642) * Update pg, pgx, sqlx (#643) - `jackc/pgx` to version `v4.11.0`. - `jmoiron/sqlx` to version`v1.3.3` - `lib/pq` to version`v1.10.1` * Fix Inner has many associations when passing on multiple arguments (#633) * Fix Inner has many associations when passing on multiple arguments for inner fields * Fix broken tests * clean up extractFieldAndInnerFields function Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com> * Remove many to many TX condition for EagerPreload (#645) * Remove the need to use Tx when loading many to many associations * replace TX access to create a new tx.Store.Transaction() object * Added fix/tests for has_many with pointer foreign key (#647) Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com> Co-authored-by: Patrik <zepatrik@users.noreply.github.com> Co-authored-by: Michael Montgomery <mmontg1@gmail.com> Co-authored-by: kyrozetera <jasonhale.w@gmail.com> Co-authored-by: Reggie Riser <4960757+reggieriser@users.noreply.github.com> Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> Co-authored-by: Brian Buchholz <4773480+bhb603@users.noreply.github.com> Co-authored-by: Mike Pontillo <mpontillo@users.noreply.github.com> Co-authored-by: Benjamin Blattberg <ben.blattberg@objectrocket.com> Co-authored-by: Jonathan Duck <Duckbrain30@gmail.com> Co-authored-by: Arthur Knoepflin <arthur.knoepflin@epitech.eu> * Updating Pgx (#660) * adding goreleaser syntaz * updating pgx now really * tidying Co-authored-by: Patrik <zepatrik@users.noreply.github.com> Co-authored-by: Michael Montgomery <mmontg1@gmail.com> Co-authored-by: kyrozetera <jasonhale.w@gmail.com> Co-authored-by: Reggie Riser <4960757+reggieriser@users.noreply.github.com> Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> Co-authored-by: Stanislas Michalak <stanislas.michalak@gmail.com> Co-authored-by: Larry M Jordan <larrymoralesjordan@gmail.com> Co-authored-by: Brian Buchholz <4773480+bhb603@users.noreply.github.com> Co-authored-by: Mike Pontillo <mpontillo@users.noreply.github.com> Co-authored-by: Benjamin Blattberg <ben.blattberg@objectrocket.com> Co-authored-by: Jonathan Duck <Duckbrain30@gmail.com> Co-authored-by: Arthur Knoepflin <arthur.knoepflin@epitech.eu>
Looks good! 👍 |
fasmat
approved these changes
Nov 23, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.