-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
D1: execute --file --remote now uses dedicated import API (#5696)
* D1: Refactored to remove batching entirely This was only required for `execute --remote --file`, which will now have a dedicated endpoint. * Adds R2-based SQL import into remote D1 DBs This hits a new API endpoint 'import', that initially returns a signed R2 PUT url for uploading SQL, then returns polling info as the import completes. This completely bypasses the existing split-chunk-and-execute implementation that often left your DB in an invalid state * D1 export: make --no-schema/--no-data work Fixes #5445 * Extracted PollingFailure type * Fixing json mode for remote DB execution * Added test to cover binary sqlite3 file check * Added spinners to the output during async operations --------- Co-authored-by: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
406 additions
and
156 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"wrangler": minor | ||
--- | ||
|
||
feature: Improved `d1 execute --file --remote` performance & added support for much larger SQL files within a single transaction. |
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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export const DEFAULT_MIGRATION_PATH = "./migrations"; | ||
export const DEFAULT_MIGRATION_TABLE = "d1_migrations"; | ||
export const LOCATION_CHOICES = ["weur", "eeur", "apac", "oc", "wnam", "enam"]; | ||
// Max number of statements to send in a single /execute call | ||
export const DEFAULT_BATCH_SIZE = 10_000; |
Oops, something went wrong.