Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 6 tasks
intellix opened this issue Apr 25, 2021 · 9 comments
Closed
1 of 6 tasks

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

intellix opened this issue Apr 25, 2021 · 9 comments
Labels
type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. v6

Comments

@intellix
Copy link

intellix commented Apr 25, 2021

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

@intellix intellix added the type: docs For issues and PRs. Things related to documentation, such as changes in the manuals / API reference. label Apr 25, 2021
@github-actions
Copy link
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. 🙂

@github-actions github-actions bot added the stale label Oct 27, 2021
@intellix
Copy link
Author

not stale

@github-actions github-actions bot removed the stale label Oct 29, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2021

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. 🙂

@github-actions github-actions bot added the stale label Nov 6, 2021
@intellix
Copy link
Author

intellix commented Nov 6, 2021

not stale

@github-actions github-actions bot removed the stale label Nov 8, 2021
@bgovi
Copy link

bgovi commented Dec 6, 2021

Did this ever get resolved?

@Keimeno Keimeno self-assigned this Dec 6, 2021
@fzn0x
Copy link
Member

fzn0x commented Oct 24, 2022

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"');

@fzn0x fzn0x closed this as completed Oct 24, 2022
@ephys
Copy link
Member

ephys commented Oct 24, 2022

It's not fixed https://github.com/sequelize/sequelize/blob/v6/src/dialects/abstract/query-interface.d.ts#L662

@ephys ephys reopened this Oct 24, 2022
@fzn0x
Copy link
Member

fzn0x commented Oct 24, 2022

Thanks, updating the issue

@fzn0x fzn0x added type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. and removed type: docs For issues and PRs. Things related to documentation, such as changes in the manuals / API reference. labels Oct 24, 2022
@ephys ephys added v6 and removed hacktoberfest labels Mar 2, 2023
@ephys
Copy link
Member

ephys commented Jul 7, 2023

Closed by #15944

@ephys ephys closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. v6
Projects
None yet
Development

No branches or pull requests

5 participants