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

Typescript problem with raw inside returning() function #2337

Closed
OlivierCuyp opened this issue Nov 3, 2022 · 0 comments · Fixed by #2338
Closed

Typescript problem with raw inside returning() function #2337

OlivierCuyp opened this issue Nov 3, 2022 · 0 comments · Fixed by #2338

Comments

@OlivierCuyp
Copy link
Contributor

Here is the issue:

await Address.query()
      .insert(data)
      .returning([
        'id',
        'userId',
        'postalCode',
        'street',
        'city',
        'countryCode',
        'createdAt',
        'updatedAt',
        raw('ST_AsGeoJSON(??) AS ??', ['geoPoint', 'geoPoint']) // Typing error !
      ]);

Same issue seemed to be sloved in knex:

knex/knex#4879

I guess something similar could be done.

OlivierCuyp added a commit to OlivierCuyp/objection.js that referenced this issue Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant