feathersjs-ecosystem / feathers-objection

Feathers database adapter for Objection.js, an ORM based on KnexJS SQL query builder for Postgres, Redshift, MSSQL, MySQL, MariaDB, SQLite3, and Oracle. Forked from feathers-knex.
MIT License
98 stars 48 forks source link

Batch insert support #127

Closed mdmitry01 closed 4 years ago

mdmitry01 commented 4 years ago

Closes https://github.com/feathersjs-ecosystem/feathers-objection/issues/125

dekelev commented 4 years ago

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?

mdmitry01 commented 4 years ago

Hi @dekelev! The conflicts have been resolved.

dekelev commented 4 years ago

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 https://github.com/feathersjs-ecosystem/feathers-objection/pull/127#issuecomment-723561921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABB5E3MPY6RIX25EZR42B5DSOZ37PANCNFSM4S4WFDPQ .

dekelev commented 4 years ago

PR looks very promising! See if you can add tests for the parts that are missing code-coverage: https://coveralls.io/builds/34819739/source?filename=src/index.js

mdmitry01 commented 4 years ago
dekelev commented 4 years ago

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 https://github.com/feathersjs-ecosystem/feathers-objection/pull/127#issuecomment-724147262, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABB5E3NYM2I66ATD5VGLJOTSPAOYPANCNFSM4S4WFDPQ .

mdmitry01 commented 4 years ago

Ok, I just ran the tests locally with PostgreSQL. Lines 647, 648 and 693 are covered when using PostgreSQL.

dekelev commented 4 years ago

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 https://github.com/feathersjs-ecosystem/feathers-objection/pull/127#issuecomment-724245206, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABB5E3MJU5MCCQ6AMUBGUNTSPBC5HANCNFSM4S4WFDPQ .

mdmitry01 commented 4 years ago

Thank you!

mdmitry01 commented 4 years ago

Added a fix

dekelev commented 4 years ago

Released with v6.3.0