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

[Miniflare 3] Re-implement D1 gateway using new storage system #563

Merged
merged 2 commits into from
May 9, 2023

Conversation

mrbbot
Copy link
Contributor

@mrbbot mrbbot commented Apr 28, 2023

This PR builds on #555, and re-implements the D1 gateway using the new storage system. This also brings forward changes #533 and #544 from Miniflare 2, fixing those issues in Miniflare 3 as well. 🙂

Closes DEVX-591

Also brings forward the changes from #533 and #544

Closes DEVX-591
@mrbbot mrbbot added the tre Relating to Miniflare 3 label Apr 28, 2023
@mrbbot mrbbot requested a review from a team April 28, 2023 16:09
@changeset-bot
Copy link

changeset-bot bot commented Apr 28, 2023

⚠️ No Changeset found

Latest commit: e6d318c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mrbbot mrbbot changed the title Re-implement D1 gateway using new storage system [Miniflare 3] Re-implement D1 gateway using new storage system Apr 28, 2023
Copy link

@JacobMGEvans JacobMGEvans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor looks great

Copy link
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -3,7 +3,7 @@ import fs from "fs/promises";
import os from "os";
import path from "path";
import { performance } from "perf_hooks";
import { Database as DatabaseType, Statement } from "better-sqlite3";
import { Database as DatabaseType } from "better-sqlite3";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import type

@@ -13,7 +13,7 @@ export type TypedStatement<
};

export type TypedDatabase = Omit<Database, "prepare"> & {
prepare<Params, SingleResult = unknown>(
prepare<Params = any[], SingleResult = unknown>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unknown[]?

@mrbbot mrbbot requested a review from penalosa May 4, 2023 15:02
@mrbbot mrbbot merged commit b3c19d4 into tre May 9, 2023
@mrbbot mrbbot deleted the tre-new-storage-d1 branch May 9, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tre Relating to Miniflare 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants