-
Notifications
You must be signed in to change notification settings - Fork 238
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
A way to disable 'preventAwait' #748
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
9cb85e0
to
3494fd9
Compare
Hey 👋
I didn't get the necessity quite honestly. Can you elaborate on that? |
The code from original issue #693, and I'm not sure I can find better example.. Yeah it is not "often" but "rarely", sorry for overstating. |
There is a logical reason. People coming from knex and objection would make the mistake of awaiting queries without |
@koskimas I didn't denied it. I meant "programming logic error". Anyways, It was a light suggestion, never mind. |
I think it wouldn't hurt to add this. But remove the Edit: Or actually, will that cause infinite recursion? Does |
@koskimas Yes. That was the reason I have to delete |
…rn-off-prevent-await
Although @koskimas closed #693 as 'wontfix', I'm suggesting a way to disable the behavior of preventAwait, with a small footprint. We often returning non-Promise value in async function or then() chains. It would be great if Kysely have an option for those situation, for people who aren't Knex-newbie or know how to execute query.
The name 'allowNoopAwait' is a little bit temporary, it can be renamed as 'allowAwait', 'ignoreAwait', 'disablePreventAwait', 'iKnowHowToExecute' or something you suggest.