-
Notifications
You must be signed in to change notification settings - Fork 289
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
Introduce D1PreparedStatement.bind_refs which does not take ownership #493
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enduriel
reviewed
Mar 25, 2024
kflansburg
force-pushed
the
kflansburg/bind-refs
branch
from
March 25, 2024 16:10
9cf72a2
to
ac41bca
Compare
kflansburg
force-pushed
the
kflansburg/bind-refs
branch
from
March 25, 2024 19:26
e691207
to
e9934f2
Compare
kflansburg
force-pushed
the
kflansburg/bind-refs
branch
from
March 25, 2024 19:42
e9934f2
to
d36e6c2
Compare
jdon
pushed a commit
to jdon/workers-rs
that referenced
this pull request
Mar 27, 2024
…cloudflare#493) * Introduce D1PreparedStatement.bind_refs which does not take ownership of arguments * Do not consume prepared statement when binding and batch binding * Fix D1 tests in CI * Introduce D1 type enum, support IntoIterator bind arguments * D1Type Create JsValue on construction * Another pass on the API ergonomics * nits / docs * Tweak batch_bind
jakubadamw
referenced
this pull request
in grafbase/grafbase
Mar 28, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@types/bun](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bun) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/bun)) | [`1.0.10` -> `1.0.11`](https://renovatebot.com/diffs/npm/@types%2fbun/1.0.10/1.0.11) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fbun/1.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fbun/1.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fbun/1.0.10/1.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fbun/1.0.10/1.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | [`18.2.70` -> `18.2.73`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.70/18.2.73) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.70/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.70/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/typescript-eslint) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`7.3.1` -> `7.4.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/7.3.1/7.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2feslint-plugin/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2feslint-plugin/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2feslint-plugin/7.3.1/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2feslint-plugin/7.3.1/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@typescript-eslint/parser](https://togithub.com/typescript-eslint/typescript-eslint) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`7.3.1` -> `7.4.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/7.3.1/7.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fparser/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fparser/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fparser/7.3.1/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fparser/7.3.1/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [chrono](https://togithub.com/chronotope/chrono) | `0.4.35` -> `0.4.37` | [![age](https://developer.mend.io/api/mc/badges/age/crate/chrono/0.4.37?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/chrono/0.4.37?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/chrono/0.4.37/0.4.37?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/chrono/0.4.37/0.4.37?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [insta](https://insta.rs/) ([source](https://togithub.com/mitsuhiko/insta)) | `1.36.1` -> `1.37.0` | [![age](https://developer.mend.io/api/mc/badges/age/crate/insta/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/insta/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/insta/1.37.0/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/insta/1.37.0/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dev-dependencies | patch | | [insta](https://insta.rs/) ([source](https://togithub.com/mitsuhiko/insta)) | `1.36` -> `1.37` | [![age](https://developer.mend.io/api/mc/badges/age/crate/insta/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/insta/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/insta/1.37.0/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/insta/1.37.0/1.37.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [lambda_http](https://togithub.com/awslabs/aws-lambda-rust-runtime) | `0.9.3` -> `0.11.0` | [![age](https://developer.mend.io/api/mc/badges/age/crate/lambda_http/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/lambda_http/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/lambda_http/0.9.3/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/lambda_http/0.9.3/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [swc_ecma_parser](https://togithub.com/swc-project/swc) | `0.143.10` -> `0.143.11` | [![age](https://developer.mend.io/api/mc/badges/age/crate/swc_ecma_parser/0.143.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/swc_ecma_parser/0.143.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/swc_ecma_parser/0.143.11/0.143.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/swc_ecma_parser/0.143.11/0.143.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [tokio-rustls](https://togithub.com/rustls/tokio-rustls) | `0.25.0` -> `0.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/crate/tokio-rustls/0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/tokio-rustls/0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/tokio-rustls/0.25.0/0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/tokio-rustls/0.25.0/0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | minor | | [worker](https://togithub.com/cloudflare/workers-rs) | `0.0.21` -> `0.0.23` | [![age](https://developer.mend.io/api/mc/badges/age/crate/worker/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/worker/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/worker/0.0.21/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/worker/0.0.21/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [worker](https://togithub.com/cloudflare/workers-rs) | `0.0.21` -> `0.0.23` | [![age](https://developer.mend.io/api/mc/badges/age/crate/worker/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/worker/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/worker/0.0.21/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/worker/0.0.21/0.0.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v7.4.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#740-2024-03-25) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...v7.4.0) ##### 🚀 Features - **eslint-plugin:** \[consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata - **eslint-plugin:** \[no-unnecessary-type-arguments] handle tagged templates - **eslint-plugin:** deprecate no-throw-literal and add a renamed only-throw-error ##### 🩹 Fixes - **eslint-plugin:** \[prefer-optional-chain] address multipart nullish checks false positive - **eslint-plugin:** \[prefer-optional-chain] properly disambiguate between `boolean` and `false` - **eslint-plugin:** \[no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside ##### ❤️ Thank You - Abraham Guo - Brad Zacher - Josh Goldberg ✨ - Kim Sang Du - Kirk Waiblinger - Marco Pasqualetti - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v7.4.0`](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...5d2469142262672e381db3b4a4e2bffa80984810) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...v7.4.0) </details> <details> <summary>cloudflare/workers-rs (worker)</summary> ### [`v0.0.23`](https://togithub.com/cloudflare/workers-rs/releases/tag/v0.0.23) [Compare Source](https://togithub.com/cloudflare/workers-rs/compare/v0.0.22...v0.0.23) #### What's Changed - fix: add schedule re-export by [@​avsaase](https://togithub.com/avsaase) in [https://github.com/cloudflare/workers-rs/pull/501](https://togithub.com/cloudflare/workers-rs/pull/501) - Fix absence of worker::secret documentation by [@​Kakapio](https://togithub.com/Kakapio) in [https://github.com/cloudflare/workers-rs/pull/500](https://togithub.com/cloudflare/workers-rs/pull/500) - README: Fix beginning of code snippet by [@​kevinji](https://togithub.com/kevinji) in [https://github.com/cloudflare/workers-rs/pull/499](https://togithub.com/cloudflare/workers-rs/pull/499) - Implement Send, Sync and Clone for Fetcher by [@​avsaase](https://togithub.com/avsaase) in [https://github.com/cloudflare/workers-rs/pull/503](https://togithub.com/cloudflare/workers-rs/pull/503) #### New Contributors - [@​Kakapio](https://togithub.com/Kakapio) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/500](https://togithub.com/cloudflare/workers-rs/pull/500) - [@​kevinji](https://togithub.com/kevinji) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/499](https://togithub.com/cloudflare/workers-rs/pull/499) **Full Changelog**: cloudflare/workers-rs@v0.0.22...v0.0.23 ### [`v0.0.22`](https://togithub.com/cloudflare/workers-rs/releases/tag/v0.0.22) [Compare Source](https://togithub.com/cloudflare/workers-rs/compare/v0.0.21...v0.0.22) This release continues our conversion to the `http` crate. In a number of key ways: - [Convert test suite to use `axum`](https://togithub.com/cloudflare/workers-rs/pull/481) when `http` feature is enabled. This was a great dogfooding exercise and helped to identify ergonomics issues. Based on this we developed the utilities ([see documentation](https://docs.rs/worker/0.0.22/worker/#send-helpers)): - Introduce `worker::send` to mark arbitrary `async` functions as `Send` (useful for `axum` handler methods). - Introduce `SendFuture` wrapper for marking a specific `Future` as `Send`. - Introduce `SendWrapper` for marking a particular object as `Send`. This is useful for `axum` router state. - Implement [Send, Sync](https://togithub.com/cloudflare/workers-rs/pull/483), and [Clone](https://togithub.com/cloudflare/workers-rs/pull/484) for Queue, making it easier to use with `axum`. Thanks [@​avsaase](https://togithub.com/avsaase)! We will continue to make ergonomic improvements to simplify usage of `axum` and other frameworks which generally expect objects to be `Send`, `Sync`, and `Clone`. #### Other Changes - implement get_tags for hibernatable websockets by [@​eric-seppanen](https://togithub.com/eric-seppanen) in [https://github.com/cloudflare/workers-rs/pull/484](https://togithub.com/cloudflare/workers-rs/pull/484) - Add tests for Durable + Websocket + Hibernation API by [@​j-white](https://togithub.com/j-white) in [https://github.com/cloudflare/workers-rs/pull/495](https://togithub.com/cloudflare/workers-rs/pull/495) - Introduce `D1PreparedStatement.bind_refs` and `batch_bind` which does not take ownership of arguments, and enables more ergonomic and performant use of the D1 API. It also introduces `D1Type` which provides better type safety for these arguments than the previous API which allowed arbitrary `JsValue`. [@​kflansburg](https://togithub.com/kflansburg) in [https://github.com/cloudflare/workers-rs/pull/493](https://togithub.com/cloudflare/workers-rs/pull/493) - Expose DurableObject Storage's transaction function by [@​TannerRogalsky](https://togithub.com/TannerRogalsky) in [https://github.com/cloudflare/workers-rs/pull/487](https://togithub.com/cloudflare/workers-rs/pull/487) #### New Contributors - [@​avsaase](https://togithub.com/avsaase) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/483](https://togithub.com/cloudflare/workers-rs/pull/483) - [@​TannerRogalsky](https://togithub.com/TannerRogalsky) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/487](https://togithub.com/cloudflare/workers-rs/pull/487) **Full Changelog**: cloudflare/workers-rs@v0.0.21...v0.0.22 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/grafbase/grafbase). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bind
does not actually need owned values