cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

Update wrangler D1 docs to be consistent with CLI

Open simonha9 opened this issue 6 months ago • 2 comments

Summary

Updating wrangler d1 docs to be consistent - the current description of the --file flag is misrepresented. The CLI mentions that this switch is used for files to be ingested which may cause confusion as to expected behaviour.

npx wrangler@latest d1 execute --help
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
wrangler d1 execute <database>

Execute a command or SQL file

POSITIONALS
  database  The name or binding of the DB  [string] [required]

GLOBAL FLAGS
  -j, --experimental-json-config  Experimental: support wrangler.json  [boolean]
  -c, --config                    Path to .toml configuration file  [string]
  -e, --env                       Environment to use for operations and .env files  [string]
  -h, --help                      Show help  [boolean]
  -v, --version                   Show version number  [boolean]

OPTIONS
  -y, --yes         Answer "yes" to any prompts  [boolean]
      --local       Execute commands/files against a local DB for use with wrangler dev  [boolean]
      --remote      Execute commands/files against a remote DB for use with wrangler dev  [boolean]
      --file        A .sql file to ingest  [string]
      --command     A single SQL statement to execute  [string]
      --persist-to  Specify directory to use for local persistence (for --local)  [string]
      --json        Return output as clean JSON  [boolean] [default: false]
      --preview     Execute commands/files against a preview D1 DB  [boolean] [default: false]

Screenshots (optional)

Documentation checklist

simonha9 avatar Aug 14 '24 22:08 simonha9