-
-
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
Latest Development #716
Latest Development #716
Commits on Oct 29, 2020
-
fix: improve model ID field customization (#604)
Updates places where `"id"` was hardcoded instead of using `model.IDField()`.
Configuration menu - View commit details
-
Copy full SHA for f36afb5 - Browse repository at this point
Copy the full SHA f36afb5View commit details
Commits on Dec 15, 2020
-
Ensure uninitialized map is initialized when unmarshaling json
Add tests for this scenario
Configuration menu - View commit details
-
Copy full SHA for 4d0d826 - Browse repository at this point
Copy the full SHA 4d0d826View commit details
Commits on Dec 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 81e5f2d - Browse repository at this point
Copy the full SHA 81e5f2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e3d2e2 - Browse repository at this point
Copy the full SHA 0e3d2e2View commit details
Commits on Jan 5, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b2918a3 - Browse repository at this point
Copy the full SHA b2918a3View commit details
Commits on Jan 18, 2021
-
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.
Configuration menu - View commit details
-
Copy full SHA for 0fb7635 - Browse repository at this point
Copy the full SHA 0fb7635View commit details
Commits on Jan 27, 2021
-
* 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>
Configuration menu - View commit details
-
Copy full SHA for 119c0d2 - Browse repository at this point
Copy the full SHA 119c0d2View commit details
Commits on Jan 28, 2021
-
* 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>
Configuration menu - View commit details
-
Copy full SHA for f252caa - Browse repository at this point
Copy the full SHA f252caaView commit details
Commits on Feb 6, 2021
-
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>
Configuration menu - View commit details
-
Copy full SHA for ad18e4d - Browse repository at this point
Copy the full SHA ad18e4dView commit details -
Use
PaginatorPageKey
andPaginatorPerPageKey
variables (#615)* update pagination_test
Configuration menu - View commit details
-
Copy full SHA for e314840 - Browse repository at this point
Copy the full SHA e314840View commit details
Commits on Mar 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 46cfd45 - Browse repository at this point
Copy the full SHA 46cfd45View commit details
Commits on Apr 13, 2021
-
Allow nullable JSONB and resolve MySQL regression (#639)
Benjamin Blattberg authoredApr 13, 2021 Configuration menu - View commit details
-
Copy full SHA for fbf43b4 - Browse repository at this point
Copy the full SHA fbf43b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b7b5ef - Browse repository at this point
Copy the full SHA 1b7b5efView commit details
Commits on Apr 14, 2021
-
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.
Configuration menu - View commit details
-
Copy full SHA for 83cf49c - Browse repository at this point
Copy the full SHA 83cf49cView commit details
Commits on Apr 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 51f7117 - Browse repository at this point
Copy the full SHA 51f7117View commit details
Commits on May 5, 2021
-
- `jackc/pgx` to version `v4.11.0`. - `jmoiron/sqlx` to version`v1.3.3` - `lib/pq` to version`v1.10.1`
Configuration menu - View commit details
-
Copy full SHA for cf0a600 - Browse repository at this point
Copy the full SHA cf0a600View commit details -
Configuration menu - View commit details
-
Copy full SHA for e947d1b - Browse repository at this point
Copy the full SHA e947d1bView commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 96f8e48 - Browse repository at this point
Copy the full SHA 96f8e48View commit details
Commits on May 6, 2021
-
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
Configuration menu - View commit details
-
Copy full SHA for aeb9b56 - Browse repository at this point
Copy the full SHA aeb9b56View commit details -
Added fix/tests for has_many with pointer foreign key (#647)
Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for bef765a - Browse repository at this point
Copy the full SHA bef765aView commit details
Commits on Jun 8, 2021
-
Export WhereID, Alias, WhereNamedID (#637)
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>
Configuration menu - View commit details
-
Copy full SHA for bb07a37 - Browse repository at this point
Copy the full SHA bb07a37View commit details
Commits on Jun 28, 2021
-
fix: log model values everywhere (#656)
Some SQL logs were missing the values as argument. This adds all places
Configuration menu - View commit details
-
Copy full SHA for d279000 - Browse repository at this point
Copy the full SHA d279000View commit details
Commits on Jul 16, 2021
-
Add delete to query builder (#658)
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
Configuration menu - View commit details
-
Copy full SHA for 0ecad25 - Browse repository at this point
Copy the full SHA 0ecad25View commit details
Commits on Aug 10, 2021
-
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>
Configuration menu - View commit details
-
Copy full SHA for bb7527e - Browse repository at this point
Copy the full SHA bb7527eView commit details
Commits on Oct 3, 2021
-
Preserve eager information when validating models (#664) (#665)
Co-authored-by: Karl Haas <karl.haas@coditects.com>
Configuration menu - View commit details
-
Copy full SHA for e383983 - Browse repository at this point
Copy the full SHA e383983View commit details
Commits on Nov 23, 2021
-
Migrate from packr to fs (#667)
* 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>
Configuration menu - View commit details
-
Copy full SHA for 45bb170 - Browse repository at this point
Copy the full SHA 45bb170View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2bb309 - Browse repository at this point
Copy the full SHA d2bb309View commit details -
* 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>
Configuration menu - View commit details
-
Copy full SHA for 86d67a1 - Browse repository at this point
Copy the full SHA 86d67a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a61a3fd - Browse repository at this point
Copy the full SHA a61a3fdView commit details
Commits on Dec 3, 2021
-
The command has been removed from the CLI. This patch introduces a new mechanism to reliably dump the SQL schema for CockroachDB.
Configuration menu - View commit details
-
Copy full SHA for b72810f - Browse repository at this point
Copy the full SHA b72810fView commit details
Commits on Dec 10, 2021
-
Resolve
EagerPreload
panic caused for pointer referencesResolves a panic where `EagerPreload` tried to set `reflect.Struct` for a `reflect.Pointer` on 1.. associations. Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 94d331f - Browse repository at this point
Copy the full SHA 94d331fView commit details -
Resolve
EagerPreload
panic caused by NullUUIDResolves a panic where `EagerPreload` was trying to set UUID into NullUUID. Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d4a4f55 - Browse repository at this point
Copy the full SHA d4a4f55View commit details -
Support pointers in n+1
Eager
loadingResolves an issue where n+1 eager associations would error with a double pointer in `associations.ForStruct`. Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 321cc6a - Browse repository at this point
Copy the full SHA 321cc6aView commit details -
Improve error message of associations.ForStruct
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for cd4d78c - Browse repository at this point
Copy the full SHA cd4d78cView commit details -
Add test cases for
IsZeroOfUnderlyingType
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 8817167 - Browse repository at this point
Copy the full SHA 8817167View commit details -
Resolve an obscure bug where empty structs got loaded for NULL foreig…
…n keys Closes #139 Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for e867f2c - Browse repository at this point
Copy the full SHA e867f2cView commit details -
Resolve association regression in finders.go
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 7c217b9 - Browse repository at this point
Copy the full SHA 7c217b9View commit details -
Use dedicated migrations for preloading regression test
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 3ba6312 - Browse repository at this point
Copy the full SHA 3ba6312View commit details -
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 134d8a6 - Browse repository at this point
Copy the full SHA 134d8a6View commit details -
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 08f34ff - Browse repository at this point
Copy the full SHA 08f34ffView commit details -
Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for bf0ffb2 - Browse repository at this point
Copy the full SHA bf0ffb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20bb080 - Browse repository at this point
Copy the full SHA 20bb080View commit details -
Configuration menu - View commit details
-
Copy full SHA for d148b95 - Browse repository at this point
Copy the full SHA d148b95View commit details
Commits on Feb 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f7abee9 - Browse repository at this point
Copy the full SHA f7abee9View commit details
Commits on Feb 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 32f6994 - Browse repository at this point
Copy the full SHA 32f6994View commit details
Commits on Apr 11, 2022
-
test: use
T.TempDir
to create temporary test directoryThis commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The directory created by `t.TempDir` is automatically removed when the test and all its subtests complete. Prior to this commit, temporary directory created using `ioutil.TempDir` needs to be removed manually by calling `os.RemoveAll`, which is omitted in some tests. The error handling boilerplate e.g. defer func() { if err := os.RemoveAll(dir); err != nil { t.Fatal(err) } } is also tedious, but `t.TempDir` handles this for us nicely. Reference: https://pkg.go.dev/testing#T.TempDir Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2ff8b3f - Browse repository at this point
Copy the full SHA 2ff8b3fView commit details
Commits on Apr 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0656433 - Browse repository at this point
Copy the full SHA 0656433View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6d7437 - Browse repository at this point
Copy the full SHA d6d7437View commit details
Commits on Apr 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1dad15a - Browse repository at this point
Copy the full SHA 1dad15aView commit details -
test: add other fields to duplicate type, because of some kind of que…
…ry builder cache
Configuration menu - View commit details
-
Copy full SHA for d60e1cf - Browse repository at this point
Copy the full SHA d60e1cfView commit details -
This commit introduces a new function, UpdateQuery, that enables updating all rows matched by a query. It can be used for conditional updates.
Configuration menu - View commit details
-
Copy full SHA for e6ba76b - Browse repository at this point
Copy the full SHA e6ba76bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d722117 - Browse repository at this point
Copy the full SHA d722117View commit details
Commits on Apr 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 6abef98 - Browse repository at this point
Copy the full SHA 6abef98View commit details
Commits on May 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1173792 - Browse repository at this point
Copy the full SHA 1173792View commit details
Commits on May 15, 2022
-
feat: darwin arm64 binary (#690)
* feat: arm64 binary * v6.0.2 (#704) * 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> * Export WhereID, Alias, WhereNamedID (#637) 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> * fix: log model values everywhere (#656) Some SQL logs were missing the values as argument. This adds all places * Add delete to query builder (#658) 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 * Sort down migrations (#657) 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> * Preserve eager information when validating models (#664) (#665) Co-authored-by: Karl Haas <karl.haas@coditects.com> * Migrate from packr to fs (#667) * 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> * Task merging master (#669) * 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> * Replace removed command The command has been removed from the CLI. This patch introduces a new mechanism to reliably dump the SQL schema for CockroachDB. * Resolve `EagerPreload` panic caused for pointer references Resolves a panic where `EagerPreload` tried to set `reflect.Struct` for a `reflect.Pointer` on 1.. associations. Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Resolve `EagerPreload` panic caused by NullUUID Resolves a panic where `EagerPreload` was trying to set UUID into NullUUID. Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Support pointers in n+1 `Eager` loading Resolves an issue where n+1 eager associations would error with a double pointer in `associations.ForStruct`. Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Improve error message of associations.ForStruct Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Add test cases for `IsZeroOfUnderlyingType` Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Resolve an obscure bug where empty structs got loaded for NULL foreign keys Closes #139 Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Resolve association regression in finders.go Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Use dedicated migrations for preloading regression test Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Fix code regression Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Fix test code regressions Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Fix sql migration order Signed-off-by: aeneasr <3372410+aeneasr@users.noreply.github.com> * Resolve order issue in test * Ignore order when testing for nil values in test * Pass Context during exec in create. (#688) * feat: support embedded struct fields (#691) * test: use `T.TempDir` to create temporary test directory This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The directory created by `t.TempDir` is automatically removed when the test and all its subtests complete. Prior to this commit, temporary directory created using `ioutil.TempDir` needs to be removed manually by calling `os.RemoveAll`, which is omitted in some tests. The error handling boilerplate e.g. defer func() { if err := os.RemoveAll(dir); err != nil { t.Fatal(err) } } is also tedious, but `t.TempDir` handles this for us nicely. Reference: https://pkg.go.dev/testing#T.TempDir Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> * task: adding next version number 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> Co-authored-by: karlhaas <haaskarl81@gmail.com> Co-authored-by: Karl Haas <karl.haas@coditects.com> Co-authored-by: Matthias Fasching <fasching.matthias@gmail.com> Co-authored-by: Martin Eigenbrodt <martin.eigenbrodt@googlemail.com> Co-authored-by: Eng Zer Jun <engzerjun@gmail.com> * play time * chore: updates * chore: reset formatting 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> Co-authored-by: karlhaas <haaskarl81@gmail.com> Co-authored-by: Karl Haas <karl.haas@coditects.com> Co-authored-by: Matthias Fasching <fasching.matthias@gmail.com> Co-authored-by: Martin Eigenbrodt <martin.eigenbrodt@googlemail.com> Co-authored-by: Eng Zer Jun <engzerjun@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ca4f9fd - Browse repository at this point
Copy the full SHA ca4f9fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3075ec - Browse repository at this point
Copy the full SHA e3075ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for d87f42d - Browse repository at this point
Copy the full SHA d87f42dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26aa9b0 - Browse repository at this point
Copy the full SHA 26aa9b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b62eb16 - Browse repository at this point
Copy the full SHA b62eb16View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34037d1 - Browse repository at this point
Copy the full SHA 34037d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c3fa0f - Browse repository at this point
Copy the full SHA 1c3fa0fView commit details