Skip to content

startsWith and endsWith operators are reversed #10743

Closed

Description

@gabegorelick

What are you doing?

#9999 introduced the startsWith and endsWith operators, but they seem to be reversed:

image

What do you expect to happen?

[Op.startsWith]: 'hat' should be defined as hat%, i.e. the string begins with hat and then has anything afterwards.

[Op.endsWith]: 'hat' should be defined as %hat, i.e. the string begins with anything but ends with hat.

What is actually happening?

startsWith and endWith are the reverse of what I expect. The unit tests for this feature exhibit the same behavior.

Dialect: any
Dialect version: any
Database version: any
Sequelize version: master
Tested with latest release: yes

Activity

  1. ferfabricio commented on Apr 9, 2019

    @ferfabricio
    Contributor

    Sorry I'd not see this in my work, I'll fix this ASAP

  2. added
    type: bug
    on Apr 10, 2019
  3. sushantdhiman commented on Apr 12, 2019

    @sushantdhiman
    Contributor

    🎉 This issue has been resolved in version 5.3.3 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    releasedtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions