Skip to content

QueryInterface.escape is not a function - but defined in Types #13225

Closed

Description

@intellix

Issue Description

Using Postgres adapter and have updated from 4.x to 6.5.x and this:

sequelize.getQueryInterface().escape('"hey"');

Gives the following error:

TypeError: getQueryInterface(...).escape is not a function

Method defined as being available here:
https://github.com/sequelize/sequelize/blob/v6/src/dialects/abstract/query-interface.d.ts#L659-L662

Issue Template Checklist

Is this issue dialect-specific?

  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ
  • I don't know.

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • x ] Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

I can submit a PR but I'm not sure if this is dialect-specific or how much of QueryInterface type definition is true/false

Activity

  1. added
    docs
    on Apr 25, 2021
  2. github-actions commented on Oct 27, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  3. intellix commented on Oct 28, 2021

    @intellix
    Author

    not stale

  4. github-actions commented on Nov 6, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  5. intellix commented on Nov 6, 2021

    @intellix
    Author

    not stale

  6. bgovi commented on Dec 6, 2021

    @bgovi

    Did this ever get resolved?

  7. self-assigned this
    on Dec 6, 2021
  8. fzn0x commented on Oct 24, 2022

    @fzn0x
    Member

    Did this ever get resolved?

    Edit: This is already resolved on our latest v7.

    You can use queryGenerator to use escape() now:

    sequelize.getQueryInterface().queryGenerator.escape('"hey"');
  9. reopened this on Oct 24, 2022
  10. fzn0x commented on Oct 24, 2022

    @fzn0x
    Member

    Thanks, updating the issue

  11. added
    typescript
    and removed
    docs
    on Oct 24, 2022
  12. ephys commented on Jul 7, 2023

    @ephys
    Member

    Closed by #15944

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

    typescriptv6

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions