question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'fieldMap' property is missing in 'QueryOptions' typings

See original GitHub issue

Issue Description

What are you doing?

const query = `any query here`;

const result = await sequelize.query(query, {
    replacements: {
        ...
    },
    type: QueryTypes.SELECT,
    fieldMap: {
        ...
    }
});

What do you expect to happen?

There are no compilation errors.

What is actually happening?

error TS2769: No overload matches this call.
The last overload gave the following error.
    Argument of type '{ replacements: { groupId: number; offset: number; perPage: number; fromDate: any; toDate: any; }; type: QueryTypes.SELECT; fieldMap: {}' is not assignable to parameter of type 'QueryOptions | QueryOptionsWithType<QueryTypes.RAW>'.
      Object literal may only specify known properties, and 'fieldMap' does not exist in type 'QueryOptions | QueryOptionsWithType<QueryTypes.RAW>'.

Additional context

Screen Shot 2019-10-17 at 17 24 36

Environment

  • Sequelize version: 5.19.8
  • Node.js version: 10.16.1
  • Operating System: macOS 10.14.6
  • TypeScript version: 3.6.4

Issue Template Checklist

How does this problem relate to dialects?

  • I think this problem happens regardless of the dialect.
  • I think this problem happens only for the following dialect(s):
  • I don’t know, I was using PUT-YOUR-DIALECT-HERE, with connector library version XXX and database version XXX

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

  • Yes, I have the time and I know how to start.
  • 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
techguysidcommented, Nov 12, 2019

Willing to fix this.

1reaction
techguysidcommented, Nov 13, 2019

@papb - pinged you on sequelize’s slack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing query for nested property in ElasticSearch
I am trying to write a query that returns all docs which don't have a particular field which is a nested property but...
Read more >
Upgrade to v6 - Sequelize
Sequelize v6 is the next major release after v5. Below is a list of breaking changes to help you upgrade.
Read more >
Table to Table Missing Field Map Functionality - Esri Community
Solved: Table to Table tool in Modebuilder Missing the Field Map functionality ArcPro 2.6.0. Below is an example on the left is the...
Read more >
FieldMap—ArcGIS Pro | Documentation
The FieldMap object provides a field definition and a list of input fields taken from a set of tables or feature classes. Discussion....
Read more >
postgres check constraint other table - Fluow
Main content: Missing letters. ... fix(types): added 'fieldMaps' to QueryOptions typings, fix(types): specified 'this' for getters and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found