profile
viewpoint

Pull request review commentsequelize/sequelize

refactor(cls): remove cls support

 Sequelize v6 is the next major release after v4 ### Support for Node 8 and up  Sequelize v6 will only support Node 8 and up++### Removal of CLS++CLS allowed implicit passing of the `transaction` property to query options inside of a transaction.+This feature was removed for 3 reasons.++- It required hooking the promise implementation which is not sustainable for the future of sequelize.+- It's generally unsafe due to it's implicit nature.+- It wasn't always reliable when mixed promise implementations were used.++Check all your usage of the `.transaction` method and make you sure explicitly pass the `transaction` object for each subsequent query.

"make you sure" > "make sure you"?

SimonSchick

comment created time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 392699122a88e63829856458209e005264da3adf

fix(types): add using & operator index interface (#10813)

view details

Chocobozzz

commit sha 032d9968a5126cce5093619b716cd25d3a2e3d99

fix(types): scope typing (#10803)

view details

Sushant

commit sha 5fa6e2c2d4399535d12865f10736cc954b36058e

docs: change invalid mention of inferNew

view details

push time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 1053988c3a034855de870f41f690cb0f174f758a

feat(types): model.get overloading reordering

view details

push time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 7531e735ec5bb972e53b33f48845ff9c5a0b2cec

feat(types): model.get overloading reordering

view details

push time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha c44c72ae23b6add02f2dfd7390431491a934aeec

fix(instance): isSoftDelete true after creating (#10799)

view details

Tony Brix

commit sha d1645f23a3e75964edfb723fc1ff4c24988a07ac

fix(mssql): describeTable for VARCHAR(MAX) (#10795)

view details

Mirko Jotic

commit sha e3d6795ddc19f78a26d4d98a1a633161fe1182ab

feat(types): adding Literal type to Operators (#10796)

view details

Mirko Jotic

commit sha 392699122a88e63829856458209e005264da3adf

fix(types): add using & operator index interface (#10813)

view details

Chocobozzz

commit sha 032d9968a5126cce5093619b716cd25d3a2e3d99

fix(types): scope typing (#10803)

view details

Sushant

commit sha 5fa6e2c2d4399535d12865f10736cc954b36058e

docs: change invalid mention of inferNew

view details

Mirko Jotic

commit sha 5f33f45fa5a8df1ac93cd60968f97deb5c2d14c1

Merge branch 'master' into types-model-get-key-type

view details

push time in 2 months

PR opened sequelize/sequelize

feat(types): add using & operator index interface

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10811 <!-- Please provide a description of the change here. --> Adding missing fields to ModelIndexesOptions

+25 -1

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : types-gin-index

created branch time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 909c7acb9944c0c4c91c0eba46970632234517da

feat(typings): formating

view details

push time in 2 months

PR opened sequelize/sequelize

feat(types): add Paranoid to Includeable

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Solves #10787 <!-- Please provide a description of the change here. -->

Adding Paranoid to Includeable and adding a type test.

+9 -1

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : types-add-paranoid-to-includeable

created branch time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 638b13b243037e42131c8d2ea4aa765e3373bbd0

feat(typings): model.count with group by (#10763)

view details

Philipp

commit sha 2f6e01b5a73fc8ec60880ff749a5f37458bd3410

fix(typings): extend FindOptions with QueryOptions (#10766)

view details

Mirko Jotic

commit sha 2c18e084509469c7e8b9fdbabcb4c713312c216d

feat(sync): allow altering comments (#10758)

view details

Mirko Jotic

commit sha 380738b8b23e7c764ecc0440e7b0a3214a871512

docs(scopes): attributes key merging (#10776)

view details

Mirko Jotic

commit sha f4a46dc1f2d91f4a29fc054450c2784f5aba85bd

fix(typings): add OptimisticLockError type (#10777)

view details

Jonathan Hoyt

commit sha 720f7ec91c6f4eaecdbcf768c9d4bfdf9d14c257

feat(mysql): indexHints support (#10756)

view details

Sushant

commit sha 93e64a9a6f4bef0e606e993271ed963fa0f530a9

docs: index hints

view details

DC

commit sha 4cc7dc8a4d9b85dc7dfef5064175a3cdc09c0fa8

fix(model): handle virtual attributes in includes (#10785)

view details

Mirko Jotic

commit sha c44c72ae23b6add02f2dfd7390431491a934aeec

fix(instance): isSoftDelete true after creating (#10799)

view details

Tony Brix

commit sha d1645f23a3e75964edfb723fc1ff4c24988a07ac

fix(mssql): describeTable for VARCHAR(MAX) (#10795)

view details

Mirko Jotic

commit sha e3d6795ddc19f78a26d4d98a1a633161fe1182ab

feat(types): adding Literal type to Operators (#10796)

view details

push time in 2 months

Pull request review commentsequelize/sequelize

feat(types): model.get overloading reordering

 class MyModel extends Model { }  const assoc: Association = MyModel.associations.other;++const Instance: MyModel = new MyModel({ int: 10 });+const int: IntegerDataType = Instance.get('int');

Should be good now.

mirkojotic

comment created time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 8872f9e6f7ee91e3fd74c35d2a2166133d81cfeb

fix(typings): using number type

view details

push time in 2 months

pull request commentsequelize/sequelize

Pass useUTC dialect option to mssql/Tedious

I'm glad you've found the solution @molaux and thanks for the contribution! A side note Sequelize comes with docker container definitions with all the databases you might need for integration testing. I don't have mssql locally either but fortunately docker works well. The CI failures are unrelated to your change, I believe.

On to the change, this might need to a documentation change and maybe a default value (also documented). @sushantdhiman

molaux

comment created time in 2 months

pull request commentsequelize/sequelize

fix(describeTable): MAX string length for mssql

Hi @UziTech I would make a new test case in this file and make a condition to check if the dialect is mssql like so. Just define one field with MAX length, perform a describeTable and check it is correct. Let me know if you need anything :wink:

UziTech

comment created time in 2 months

PR opened sequelize/sequelize

fix(instance): isSoftDelete true after creating

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10714 <!-- Please provide a description of the change here. --> Handling deleted_at being undefined if not defaulted when model is created.

+7 -1

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : fix-is-soft-delete-erroneous

created branch time in 2 months

issue commentsequelize/sequelize

[BUG] sequelize.sync ({alter:true}) not altering tables.

@sushantdhiman is adding this feature to mariaDB something possible and something we want to pursue?

iwaduarte

comment created time in 2 months

PR opened sequelize/sequelize

feat(types): model.get overloading reordering

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10782 <!-- Please provide a description of the change here. --> Adding a test and reordering overloading

+6 -2

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : types-model-get-key-type

created branch time in 2 months

issue commentsequelize/sequelize

Typescript Literal for WhereOperators

@SimonSchick sorry I didn't see there is already a PR open for this. You can close mine if it doesn't prove useful.

mtryba

comment created time in 2 months

PR opened sequelize/sequelize

feat(types): adding Literal type to Operators

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Solves #10789 <!-- Please provide a description of the change here. --> Adding Literal as an option for most of Operators

+42 -16

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : adding-literal-type-to-operators

created branch time in 2 months

issue commentsequelize/sequelize

Typescript Literal for WhereOperators

@SimonSchick any specific reason why this wasn't included in type definition. If not I can add it.

mtryba

comment created time in 2 months

delete branch mirkojotic/sequelize

delete branch : scope-overwrite-attributes

delete time in 2 months

PR opened sequelize/sequelize

feat(types): adding OptimisticLockError type

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10775 <!-- Please provide a description of the change here. --> Adding type of OptimisticLockError and a test.

+20 -0

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : optimistic-lock-error-ts

created branch time in 2 months

issue commentsequelize/sequelize

Aggregate functions returning wrong results

@farnazj I'm sorry you're having issues with it but I don't think this is an issue in sequelize. In the example I've posted above, everything returns correctly so aggregation is working fine. The problem in the query your code produces (imho) is that you are grouping by 'PostAssessments.id` which will result in the response you are getting. This is the query

SELECT 
`Post`.`id`, `Post`.`title`, `Post`.`createdAt`, `Post`.`updatedAt`, 
MIN(`PostAssessments`.`postCredibility`) AS `minValidity`, 
MAX(`PostAssessments`.`postCredibility`) AS `maxValidity`, 
COUNT(`PostAssessments`.`id`) AS `count`
FROM `Posts` AS `Post` 
INNER JOIN `Assessments` AS `PostAssessments` 
ON `Post`.`id` = `PostAssessments`.`PostId` 
GROUP BY `Post`.`id`, `PostAssessments`.`id` 
ORDER BY `Post`.`updatedAt` DESC, `PostAssessments`.`updatedAt` DESC;

That might be something to look into, other than that I can't help you further.

farnazj

comment created time in 2 months

PR opened sequelize/sequelize

feat(docs): attributes key merging

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10742 <!-- Please provide a description of the change here. --> Trying to clarify that options.attributes.exclude is always going to be preserved no matter how many scopes are applied.

@sushantdhiman if I wasn't clear enough let me know and I'll fix it up.

+2 -0

0 comment

1 changed file

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : scope-documentation-change

created branch time in 2 months

issue commentsequelize/sequelize

Aggregate functions returning wrong results

@farnazj I don't think this is an issue in sequelize.

Assessment.findAll({
              attributes: [
                [Sequelize.fn('MIN', Sequelize.col('postCredibility')), `minValidity`],
                [Sequelize.fn('MAX', Sequelize.col('postCredibility')), `maxValidity`],
                [Sequelize.fn('COUNT', Sequelize.col('postCredibility')), `count`]
              ],
              include: [
                Post
              ],
              group: ['Post.id'],
              raw: true,
              logging: console.log
            })

I turned stuff around a bit and I think I got the result you were looking for.

farnazj

comment created time in 2 months

PR closed sequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [ ] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Hopefully solves #10742 As per documentation if multiple scopes are used, later should overwrite the previous scope. For some reason ( and I might be missing the real why ) they were being unioned with (_.union). So please let me know if this is useless. <!-- Please provide a description of the change here. -->

+43 -1

3 comments

2 changed files

mirkojotic

pr closed time in 2 months

pull request commentsequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

Gladly

mirkojotic

comment created time in 2 months

Pull request review commentsequelize/sequelize

feat(comments): allow altering comments

 describe(Support.getTestDialectTeaser('QueryInterface'), () => {             expect(describedTable.level_id.allowNull).to.be.equal(true);           });         });-        ++        it('should change the comment of column', function() {+          return this.queryInterface.describeTable({+            tableName: 'users'+          }).then( describedTable => {

Should be good now.

mirkojotic

comment created time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 0f74b03e93ff47c5a45b9bd5db539ced63058cfb

feat(comments): formatting fix

view details

push time in 2 months

pull request commentsequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

I'm aware the tests are failing this is more of a sanity check / WIP PR. I just wanted to make sure this approach is sound. Tests are expecting this UNION even though documentation says otherwise. So either one or the other should change (my point of view).

mirkojotic

comment created time in 2 months

PR opened sequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Hopefully solves #10742 As per documentation if multiple scopes are used, later should overwrite the previous scope. For some reason ( and I might be missing the real why ) they were being unioned with (_.union). So please let me know if this is useless. <!-- Please provide a description of the change here. -->

+43 -1

0 comment

2 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : scope-overwrite-attributes

created branch time in 2 months

issue commentsequelize/sequelize

(mysql) BIGINT gets stored with incorrect precision after upgrading to v5

I've dag around quite a bit to understand what's happening here and couldn't find an obvious reason why this would be happening. I've managed to reproduce the issue in our tests with:

    it('bigint precision off when using int instead of string', function() {
      const User = this.User;
      const aNumberI = 190067261967433730;
      return User.create({ aNumber: aNumberI }).then(user => {
        expect(user.aNumber).to.equal(aNumberI); // user.aNumber is still an int here
        return User.findAll().then(_user => {
          expect(parseInt(_user.aNumber, 10)).to.equal(aNumberI); // _user.aNumber is a string here, but also instead of 190067261967433730 it's "190067261967433728"
        })
      });
    });

Simple workaround is to use a string instead of an int when creating an object, but I understand this is not a solution. Odd thing is that it doesn't fail when using 481267216386621440 int.

jozsefsallai

comment created time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha b896ba4dbbc90811c53fc2dce4351d0daaed8455

fix(query-generator): fix addColumn create comment (#10117)

view details

Simon Schick

commit sha c1ac54331f55b77f9fd11646715fa83282ab5c69

refactor: reduce code complexity (#10120)

view details

Igor Ovsiannikov

commit sha f66948242228aeb8cff355f0f13636afeda6de85

docs: typo in associations.md (#10157)

view details

Sushant

commit sha 4cc48a0aaabf3aeb495b956038ca5fbbb2587fef

docs(transaction): default isolation level #10111

view details

Sushant

commit sha 9ba5f3c200c5470cf9d4f123af09b9be9aba5636

fix(sqlite): simplify connection error handling

view details

Takashi Sasaki

commit sha ce9287fecfc787f5e5e5e115213c2d13d65908c1

fix(association): enable eager load with include all(#9928) (#10173)

view details

Simon Schick

commit sha 6b1ff3b1320fed5a636a1040eaaaed1d1830b980

refactor: optimize memoize use, misc cases (#10122)

view details

Sushant

commit sha 946fb72970d15a5a8b8567a720c3fe0b7518954a

fix(sync): throw when no models defined (#10175)

view details

Diogo Simões

commit sha f2cafcc4b4a2b7500ff672ebdf527f338ee20bb4

docs(migrations): added advanced skeleton example (#10190)

view details

Vladlen

commit sha ed1d28b8a7cf5c4be7fe4b32c2d7b27943b2c9c1

docs(migrations): Simplify CLI Call (#10201)

view details

javiertury

commit sha 89b8d47cc7a9b56937e81efc9e7259a12420f2b7

docs: explain custom/new data types (#10170)

view details

Sushant

commit sha 61a9b268b15b8ef4882bf45ddcc0cf5c10f7991e

docs(bulk-create): update support information about ignoreDuplicates

view details

Tommy van der Vorst

commit sha e4218a2335ba64033cb3db77daa07131ae2cf133

fix(model): prevent version number from being incremented as string (#10217)

view details

diego dupin

commit sha c6d733383dd9b877988784f28f23d47e256125f8

feat(dialect): mariadb (#10192)

view details

farisn

commit sha 2c6b6e5fb407952ab7a51536ec0ac4a06ca33443

docs(model.init): `attribute.column.validate` option (#10237)

view details

Pedro Augusto de Paula Barbosa

commit sha 227da63043e7355f126b82dbedc5fc699487ff95

docs: fix favicon (#10242)

view details

Simon Schick

commit sha 2874c54915b2594225e939809ca9f8200b94f454

chore(lint): enforce consistent spacing (#10193)

view details

Sushant

commit sha 850a47912c668c33992ef29d2373947042c0452f

docs(migrations): improve dialect options docs

view details

Sushant

commit sha 48edc85f49217c5f4078b202de179f9163aeceaa

docs: changelog for 5.0.0-beta.15

view details

Sushant

commit sha cd21f7ed172ffbb7840ebda3fba0b94d2e3f605e

5.0.0-beta.15

view details

push time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 28e55362e364998d83e02ad47786900bf5131ff8

feat(typings): adding tests for count overload

view details

push time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 9de8bd2fe1a00589d46ee44bd0e48841eca5ee72

feat(typings): adding count.ts test

view details

push time in 2 months

pull request commentsequelize/sequelize

feat(typings): model.count with group by

No problem, can you point me to an example. Not sure how testing of type definitions is done.

On Sat, Apr 13, 2019, 08:49 Simon Schick notifications@github.com wrote:

@SimonSchick requested changes on this pull request.

Needs test.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sequelize/sequelize/pull/10763#pullrequestreview-226351876, or mute the thread https://github.com/notifications/unsubscribe-auth/AKKKcPZf0BvO5-2K2-IVfFYXv57gaiDpks5vgdI-gaJpZM4cskEo .

mirkojotic

comment created time in 2 months

PR opened sequelize/sequelize

feat(typings): model.count with group by

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. --> Solves #10757 hopefully :)

I'm not well versed in typescript but if there are changes to make I'm up for it. As always if it's not useful please ignore.

Description of change

<!-- Please provide a description of the change here. -->

+17 -0

0 comment

1 changed file

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : typings-model-count-group-by

created branch time in 2 months

create barnchmirkojotic/sequelize

branch : model-count-typings-group-by

created branch time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha e877f99a45f879ad6421611b9b8d9f5b25953356

feat(comments): allow altering comments - reduce nesting in test - formating

view details

push time in 2 months

Pull request review commentsequelize/sequelize

feat(comments): allow altering comments

 class PostgresQueryGenerator extends AbstractQueryGenerator {      for (const key in attributes) {       const attribute = attributes[key];-      result[attribute.field || key] = this.attributeToSQL(attribute, options);+      result[attribute.field || key] = this.attributeToSQL(attribute, Object.assign({ key }, options || {}));

To create a comment SQL statement in pg, it was necessary to have table name and column the comment is referring to. That line just adds the column name to options.

mirkojotic

comment created time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 777b7ad205f8579d1bfd16ed6f071252a49940fa

feat(comments): allow altering comments - remediating test failiures

view details

push time in 2 months

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 30ea3531dcfdd28a04ed4f56c7e5c81e0cc93afc

feat(comments): allow altering comments - createTable event makes it's own create comment queries so it had to be excluded from attributeToSQL for now.

view details

push time in 2 months

PR opened sequelize/sequelize

feat(comments): allow altering comments

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

<!-- Please provide a description of the change here. --> Solves #10720 Adds ability to use changeColumn to alter comments. It wasn't implemented initially. Works for all dialects except sqlite.

+30 -12

0 comment

4 changed files

pr created time in 2 months

create barnchmirkojotic/sequelize

branch : allow-alter-comments

created branch time in 2 months

issue commentsequelize/sequelize

Comment ALTER Query Error

Hi @knighthell we introduced comments not too long ago and I think the scope of it at the time was to only allow for comments when table was created (so no alter functionality) and I think the docs reflect this (if not I'll make a PR to docs first and make sure it's clear) . However I'm willing to implement this so I'll be taking a look.

knighthell

comment created time in 2 months

issue commentelastic/elasticsearch

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

@polyfractal no problem 😉

I wouldn't mind taking a stab at it. I might open a WIP PR if I get stuck.

Just to confirm AggregatorTestCase is modeled after the actual internal implementation. So I need to follow that closely and add the a list of sibling aggs as argument to searchAndReduce?

polyfractal

comment created time in 3 months

issue commentelastic/

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

Hi @plyfractal, I was looking to convert a couple of other IT to ATC but I might have a few questions. Remaining ITs include a lot of bucket aggs and sibling aggs. Can you point me to an example on how I would assemble such aggregation. A small example: Currently with the IT tests there are a lot of client.addAggregation(...) which adds a sibling aggregation if I'm not wrong. The new api exposes agg.subAggregation(...) and I haven't found a comparable solution. It's obviously my lack of understanding but I wasn't able to mimic the old way. I've tried several approaches including a list of aggregations passed to the reducer with some success but not 100%. That approach was inspired with one of the tests you've started to convert but it was somewhat different than what I was trying to do. And after I've gone through that I was wondering if i made a wrong turn somewhere 😅

polyfractal

comment created time in 3 months

issue commentelastic/

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

Hi @plyfractal, I was looking to convert a couple of other IT to ATC but I might have a few questions. Remaining ITs include a lot of bucket aggs and sibling aggs. Can you point me to an example on how I would assemble such aggregation. A small example: Currently with the IT tests there are a lot of client.addAggregation(...) which adds a sibling aggregation if I'm not wrong. The new api exposes agg.subAggregation(...) and I haven't found a comparable solution. It's obviously my lack of understanding but I wasn't able to mimic the old way. I've tried several approaches including a list of aggregations passed to the reducer with some success but not 100%. That approach was inspired with one of the tests you've started to convert but it was somewhat different than what I was trying to do. And after I've gone through that I was wondering if i made a wrong turn somewhere 😅

polyfractal

comment created time in 3 months

more