Batch insert support#127
Conversation
|
Hi @mdmitry01 , Thanks for contributing and sorry for the delay. There was another PR that was merged since you opened this one and it created some code conflicts. Can you please resolve them and I'll review the PR? |
|
Hi @dekelev! The conflicts have been resolved. |
|
Thanks, I'll check it out
בתאריך יום א׳, 8 בנוב׳ 2020, 13:09, מאת Dmitry Merkulov <
notifications@github.com>:
… Hi @dekelev <https://github.com/dekelev>! The conflicts have been
resolved.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABB5E3MPY6RIX25EZR42B5DSOZ37PANCNFSM4S4WFDPQ>
.
|
|
PR looks very promising! See if you can add tests for the parts that are missing code-coverage: |
|
|
Thank you!
I'm running these PostgreSQL tests with a local PostgreSQL Docker when
there are code changes that might impact PostgreSQL.
בתאריך יום ב׳, 9 בנוב׳ 2020, 19:08, מאת Dmitry Merkulov <
notifications@github.com>:
…
-
Lines 638
<https://coveralls.io/builds/34819739/source?filename=src/index.js#L638>
and 654
<https://coveralls.io/builds/34819739/source?filename=src/index.js#L654>
were added only for backward compatibility with this line
<https://github.com/feathersjs-ecosystem/feathers-objection/blob/master/src/index.js#L659>.
As far as I understand, this line wasn't covered before. And I can't think
of any test case to cover it. Is this line supposed to be covered?
-
To cover lines 647
<https://coveralls.io/builds/34819739/source?filename=src/index.js#L647>,
648
<https://coveralls.io/builds/34819739/source?filename=src/index.js#L648>
and 693
<https://coveralls.io/builds/34819739/source?filename=src/index.js#L693>,
I need PostgreSQL (or another DB with .returning() support). I can see
some tests for PostgreSQL, but I can't see any PostgreSQL config for the
tests.
-
Line 700
<https://coveralls.io/builds/34819739/source?filename=src/index.js#L700>
is now covered
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABB5E3NYM2I66ATD5VGLJOTSPAOYPANCNFSM4S4WFDPQ>
.
|
|
Ok, I just ran the tests locally with PostgreSQL. Lines 647, 648 and 693 are covered when using PostgreSQL. |
|
Great work! I'll merge the PR tomorrow.
בתאריך יום ב׳, 9 בנוב׳ 2020, 22:00, מאת Dmitry Merkulov <
notifications@github.com>:
… Ok, I just ran the tests locally with PostgreSQL. Lines 647, 648 and 693
are covered when using PostgreSQL.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABB5E3MJU5MCCQ6AMUBGUNTSPBC5HANCNFSM4S4WFDPQ>
.
|
|
Thank you! |
|
Added a fix |
|
Released with v6.3.0 |
* Added tests on relation sorting * Fix tests clean-up * - Fixed package-lock.json - Fixed tests - Bumped version to 5.1.1 * Updated CHANGELOG file * Updated peer-dependency `objection` to v2 and up * - Added $modify query operator - Bumped version to 5.2.0 * Added $modify query operator * Updated CHANGELOG file * Removed unused dev dependency * - Fixed sorting tests to work in Postgres - Added missing cleanup code * Added support for `ref` in $select & $sort * Added support for `ref` in $select & $sort * 5.3.0 * Updated CHANGELOG file * Removed unneeded logic in get query after creating a row * Reverted: Removed unneeded logic in get query after creating a row * Changed create to insert & get by returned row fields by default (feathersjs-ecosystem#90) * Changed create to insert & get by returned row fields by default * Added test on create with ID when ID gets overridden in model Co-authored-by: Dekel Barzilay <dekel@lusha.co> * 5.3.1 * 5.3.2 * Updated CHANGELOG file * Update README.md (feathersjs-ecosystem#91) Fixed Modal -> Model typos * Updated project dependencies * 5.3.3 * Updated CHANGELOG file * Patch with same field in data & query now returns success result * 5.4.0 * Updated CHANGELOG file * Add types composite id and ERROR type (feathersjs-ecosystem#95) * 5.4.1 * Updating changelog * Added $allowRefs query operator to allow referencing other fields * 5.5.0 * Updated CHANGELOG file * Fixed count for queries with $modify query operator * 5.5.1 * Updated CHANGELOG file * Added a check on result when using $modify with pagination * 5.5.2 * Updated CHANGELOG file * Set schema option (feathersjs-ecosystem#105) Added the `schema` service option and param operator * Added the new `schema` service option & params operator to the docs * Added the new `schema` service option & params operator to the docs * 5.6.0 * Updated CHANGELOG file * Updated docs with $modifyEager JSON limitation * Bump lodash from 4.17.15 to 4.17.19 (feathersjs-ecosystem#107) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added support for GROUP BY with ONLY_FULL_GROUP_BY enabled * Added support for GROUP BY with ONLY_FULL_GROUP_BY enabled * Added support for GROUP BY with ONLY_FULL_GROUP_BY enabled * Added support for GROUP BY with ONLY_FULL_GROUP_BY enabled * 5.7.0 * Added support for GROUP BY with ONLY_FULL_GROUP_BY enabled * Fix for default operators getting overwritten by options.whitelist instead of concat (feathersjs-ecosystem#108) * Fix for options.whitelist getting overwritten instead of concat * Fixed issue with the whitelist option Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * Updated project dependencies * Added missing typescript dev module * Changed minimum supported NodeJS version to 10 * 5.8.0 * Updated CHANGELOG file * Fixed issue where query data would not properly copy if variable equates to false (feathersjs-ecosystem#115) * 5.8.1 * Updated CHANGELOG file * Added Redshift to the list of supported databases in the README file * Added major supported databases to the package.json keywords list * joinEager Fixes + $not Operator all with tests (feathersjs-ecosystem#114) * Fix $joinEager Allow $mergeEager query * add test * fix bug Allow paginated query * add test * fix bug * Add $not operator * objectify modified * include $not in default operators * add test * Lint * Fix $select and $noSelect with mutating methods * were not honored with graph * $select prevented update to update a whole object (only selected parts were updated) * a consequence of this commit is that $eager is not need anymore to upsert data (partial fix feathersjs-ecosystem#97) * $noSelect always return input data instead of an empty object * Fix feathersjs-ecosystem#97 update with user query and upsert * Enforce user query in patch with upsert * Ensure user data and query are not overwritten * in upsert graph, id is added if needed but not modified and if data[id] and patch/update id mismatch it throw * in get request, id is added to query so that the query must match id and whole user query * Improve $select after upsert * now support '*' and 'table.*' in $select * Updated README file * new features * migrating * Update README.md Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * 6.0.0 * Updated CHANGELOG file * $modify now supports passing different args to each modifier * 6.1.0 * Updated CHANGELOG file * Updated project dependencies * 6.1.1 * Updated CHANGELOG file * Atomic graph mutation (feathersjs-ecosystem#124) * Fix schema use with graph * Add $startTransaction params * allow for atomic graph upsert/insert * allow for atomic multi create * Fix $startTransaction (atomic) * Is now $atomic * Better testing * README infos Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * 6.2.0 * Changed params operator $atomic to atomic * 6.2.1 * Updated CHANGELOG file * Batch insert support (feathersjs-ecosystem#127) * Batch insert support. Closes feathersjs-ecosystem#125 * don't use .returning() with redshift dialect * add a test case: create with $noSelect and without allowedInsert * fix: Objection.js hooks don't work with '.toKnexQuery()' method * 6.3.0 * Updated CHANGELOG file * feat: use objection error types in error-handler (feathersjs-ecosystem#131) * new error handler * feat: use objection errors in error-handler * cleanup commented out lines * revert package lock * add better error messages * update readme * fix: NotNullViolationError message * update tests that rely on original error message * Fixed typo in test description Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * - Updated project dependencies - Applied semistandard linter fixes * 7.0.0 * Updated CHANGELOG file * Bump ini from 1.3.5 to 1.3.7 (feathersjs-ecosystem#137) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add optional parameter modifierFiltersResults for disabling count of $modify query results (feathersjs-ecosystem#136) * Add optional parameter modifierFiltersResults for disabling count of $modify query results * Improve test case for modifierFiltersResults parameter * Updated project dependencies * 7.1.0 * Updated CHANGELOG file * Fixed issue where using $select with a composite PK returns a database error (feathersjs-ecosystem#140) Co-authored-by: David Farrugia <david.farrugia@sagossgroup.com> * - Added missing common tests - Updated dev dependencies * 7.1.1 * Updated CHANGELOG file * fixed UniqueViolationError bug for mysql clients (feathersjs-ecosystem#141) * fixed UniqueViolationError bug when using mysql * fixed a typo and added a test * Update index.test.js * Update error-handler.js Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * Updated dev dependencies * 7.1.2 * Updated CHANGELOG file * Bump y18n from 4.0.0 to 4.0.1 (feathersjs-ecosystem#145) Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Updated dev dependencies * 7.1.3 * Updated CHANGELOG file * make params optional (feathersjs-ecosystem#146) * 7.1.4 * Updated CHANGELOG.md file * Bump lodash from 4.17.19 to 4.17.21 (feathersjs-ecosystem#148) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.19...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Updated dev dependencies * 7.1.5 * 7.1.6 * Updated CHANGELOG.md file * Handle missing top-level jsonSchema.properties in objectify() (feathersjs-ecosystem#149) * 7.1.7 * Updated CHANGELOG.md file * Remove groupBy when counting rows for pagination (feathersjs-ecosystem#150) * 7.2.0 * Updated CHANGELOG.md file * Fix patch method with complex query (feathersjs-ecosystem#151) * Fix schema use with graph * Add $startTransaction params * allow for atomic graph upsert/insert * allow for atomic multi create * Fix $startTransaction (atomic) * Is now $atomic * Better testing * README infos * Fix confilts with upstream * Fix/Add comments * Fix patch query with complex query * Fixed typo Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * 7.3.0 * Updated CHANGELOG.md file * Reverted PR feathersjs-ecosystem#150 * 7.4.0 * Updated CHANGELOG.md file * Add upsert and insert graph options in params (feathersjs-ecosystem#153) * Fix schema use with graph * Add $startTransaction params * allow for atomic graph upsert/insert * allow for atomic multi create * Fix $startTransaction (atomic) * Is now $atomic * Better testing * README infos * Fix confilts with upstream * Fix/Add comments * Fix patch query with complex query * Fixed typo * Add upsert and insert graph options in params * allow for query based insert and upsert graph options typical use case is different options based on authenticated user rights * Fix param names in previous commit Co-authored-by: Dekel Barzilay <dekelev@gmail.com> * 7.5.0 * Updated CHANGELOG.md file * - Updated dev dependencies - Added relation to the example app * 7.5.1 * Updated CHANGELOG.md file * Update grammatical error in README (feathersjs-ecosystem#156) * Fix type in README.MD (feathersjs-ecosystem#164) Change `automaticaly` to `automatically`. * Removed usage of Objection's skipUndefined deprecated method * Upgrade project dependencies * Updated minimum target version of NodeJS to 14 * 7.5.2 * Updated CHANGELOG.md file * Bump ajv from 6.12.0 to 6.12.6 (feathersjs-ecosystem#170) Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.0 to 6.12.6. - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](ajv-validator/ajv@v6.12.0...v6.12.6) --- updated-dependencies: - dependency-name: ajv dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Upgrade dev dependencies * 7.5.3 * Upgrade dev dependencies Co-authored-by: Dekel Barzilay <dekel@lusha.co> Co-authored-by: Dekel Barzilay <dekelev@gmail.com> Co-authored-by: Konstantin <outluch@gmail.com> Co-authored-by: David Luecke <daff@neyeon.com> Co-authored-by: EmileSpecs <emile.sievers@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Satyadeep <satyadeep.1991@gmail.com> Co-authored-by: Wes Winder <weswinder@users.noreply.github.com> Co-authored-by: Thomas-git <watom@ritou.me> Co-authored-by: Dmitry Merkulov <69001428+mdmitry01@users.noreply.github.com> Co-authored-by: Rob Phillips <robbyphillips@gmail.com> Co-authored-by: Alexander Friedl <52403795+alex-all3dp@users.noreply.github.com> Co-authored-by: davidf84 <78353459+davidf84@users.noreply.github.com> Co-authored-by: David Farrugia <david.farrugia@sagossgroup.com> Co-authored-by: Marco Ahlers <61047871+Tr3ffel@users.noreply.github.com> Co-authored-by: fratzinger <22286818+fratzinger@users.noreply.github.com> Co-authored-by: Guillaume Mercey <guillaume.mercey@gmail.com> Co-authored-by: Eric Irish <ecirish@gmail.com>
Closes #125