Commit graph

16 commits

Author SHA1 Message Date
Dustin Brown
b9b4378942
bd sql (proxied-server): multi-statement batches and --database flag (#5002)
* maybe

* /{cmd,internal}: updates to bd sql proxied-server mode

* fix(sql): terminate line comments on CR and scope multi-statement help

Address Copilot review on #5002:
- topLevelStatementCount: `--` and `#` line comments now terminate on CR as
  well as LF, so CR-only line endings can't swallow following statements and
  undercount a batch.
- sql help text: scope the multi-statement batch semantics to proxied-server
  mode alongside --database.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 21:11:32 -07:00
Test User
b2e512ba79 test: reconcile the sqlite-era tests the reapply left asserting live support
The #4847 reapply brought back tests written when sqlite was still a
supported backend; update them to the tombstone contract:

- internal/beads: FindDatabasePath returns "" for sqlite metadata (fail
  closed at store selection) and never creates the database file.
- doctor: server health reports the generic non-Dolt warning; the perf
  refusal message names the backend without a support claim.
- examples/library-usage: exercise the API against embedded Dolt instead
  of the removed sqlite backend.

Also sweep stragglers flagged in review: bd sql help text, conformance
audit provenance comments, the test-strategy example path, and a comment
tying the flake devShell sqlite3 CLI to the legacy migration scripts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 02:43:57 +00:00
coffeegoddd☕️✨
6133f7a3f7 /cmd/bd/sql_proxied_server.go: drop unused cmd param (unparam)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 10:55:55 -07:00
coffeegoddd☕️✨
d0acbadff2 /{cmd,internal}: bd sql proxied-server mode 2026-07-06 10:55:55 -07:00
coffeegoddd☕️✨
d7d7a34607 : refactor to use RunE, emit usage metrics, skip metrics in CI
(cherry picked from commit 9596c7233d)
2026-06-22 20:44:43 +00:00
coffeegoddd☕️✨
4bf03b31e6 /{cmd,internal}: initial proxy server backend pass 2026-05-07 16:26:16 -07:00
Julian Knutsen
9d9d0e53c2
fix: unwrap HookFiringStore decorator before optional interface type assertions (#2937)
The HookFiringStore decorator wraps DoltStorage for automatic hook
firing, but hides the concrete store's optional interfaces
(StoreLocator, BackupStore, Flattener, Compactor, etc.) from type
assertions. This caused "storage backend does not support X" errors
for flatten, backup, compact, dolt remote, and other operations.

Add storage.UnwrapStore() helper that peels the decorator before type
assertions, and apply it at all 24 callsites in cmd/bd/.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:12:59 -07:00
coffeegoddd☕️✨
a35edfd28e /{internal,cmd,.goreleaser,.github}: embedded mode by default 2026-03-28 13:47:20 -07:00
coffeegoddd☕️✨
18d47e29f1 /cmd/bd: fix format string 2026-03-26 11:25:54 -07:00
coffeegoddd☕️✨
f4b04e2ecd /cmd/bd: remove docker tip in embeddeddolt mode 2026-03-26 11:13:02 -07:00
coffeegoddd☕️✨
ec6b65d2e1 /{cmd,internal}: fix commands 2026-03-25 13:48:13 -07:00
coffeegoddd☕️✨
f0b2b70093 /cmd/bd: do type check 2026-03-17 13:26:18 -07:00
coffeegoddd☕️✨
58915b13e7 /{cmd,internal}: update global store to be interface 2026-03-17 13:26:17 -07:00
collins
ac9ac70911 feat: add bd context command and safe-first error guidance (fix-merge PR #2496)
Add bd context command showing effective backend identity (beads dir, repo
root, dolt mode, server endpoint, database, project ID, role) without requiring
DB open -- useful for degraded-state diagnostics. Supports --json.

Update error messages across 13 commands to suggest bd doctor for diagnosis
before bd init for reset, preventing unsafe destructive recovery paths.

Fix: use cfg.GetDoltServerPort() instead of doltserver.DefaultConfig() for
correct port resolution in context command. Add env var isolation in tests
to prevent BEADS_DOLT_PORT interference.

Co-Authored-By: matt wilkie <maphew@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:32:36 -07:00
Marco Del Pin
b8ab4fed91
fix: remove stale --no-db flag references from help and errors (#1895)
The --no-db CLI flag was removed when beads switched to Dolt-only, but
several user-facing messages still referenced it:
- bd init help text mentioned "--no-db" as a valid option
- Error messages in 6 commands suggested "use 'bd --no-db'" as a fix
- Generic "no database found" hint suggested the removed flag
- Dead code block in init.go handled --no-db initialization
The config key (no-db: true in config.yaml) is still valid for the
CGO fallback path; only the CLI flag references are removed.
Fixes #1848
2026-02-20 09:23:02 -08:00
jasper
dd9d37cb12 feat: add bd sql command for raw SQL access to database (bd-x67d1)
Adds a new `bd sql` subcommand that passes raw SQL queries directly to
the underlying database (SQLite or Dolt). Supports table, JSON, and CSV
output for SELECT queries, and reports rows affected for write queries.
Write queries are blocked in read-only mode via CheckReadonly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/polecats/jasper
Rig: beads
Role: polecats
2026-02-08 13:49:10 -08:00