Skip to content

docs(providers): add capabilities, error handling, and usage examples to libsql doc - #946

Merged
cevheri merged 1 commit into
libredb:mainfrom
De-pitcher:docs/libsql-provider-documentation
Sep 17, 2026
Merged

cevheri merged 1 commit into
libredb:mainfrom
De-pitcher:docs/libsql-provider-documentation

Conversation

@De-pitcher

@De-pitcher De-pitcher commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Description

Brings \docs/providers/libsql.md\ in line with the standard provider doc structure (matching sibling docs such as \docs/providers/mongodb.md\ and \docs/providers/sqlite.md) by adding the missing Capabilities & labels, Error handling, and Usage examples sections, with verified content reflecting the actual libSQL provider implementation.

Type of Change

  • Documentation update

Related Issue

Closes #862

Changes Made

  • Added Section 9: Capabilities & labels documenting \getCapabilities()\ flags (\supportsExplain, \explainFormat, \supportsTransactions: false, \maintenanceOperations: [reindex, check], \containerLevels: [], \objectKinds) and custom \getLabels()\ overrides (\slowQueriesEmptyState,
    eindexGlobal*).
  • Added Section 10: Error handling documenting the status-code mapping from \LibSQLTransportError\ to \DatabaseConfigError, \AuthenticationError\ (for 400/401/403), \ConnectionError\ (status 0), and \QueryError.
  • Renumbered Section 11: Testing.
  • Added Section 12: Usage examples with TypeScript code examples for connecting via Turso Cloud connection string or local \sqld, running parameterised queries, introspecting schema objects, and executing maintenance integrity checks.
  • Renumbered Section 13: Known limitations & future work and Section 14: References accordingly.

Testing

  • I have tested this locally
  • All existing unit and integration tests pass (\�un test tests/unit/db/libsql tests/integration/db/libsql-provider.test.ts\ — 190 pass)
  • Formatted with biome forma

Test Environment

  • OS: Windows 11
  • Node.js/Bun Version: Bun 1.3.11

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have updated the documentation accordingly
  • New and existing unit tests pass locally with my changes

@cevheri cevheri added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 17, 2026
@cevheri

cevheri commented Sep 17, 2026

Copy link
Copy Markdown
Member

Approving this. I checked every claim in the new sections against the provider source rather than reading them for shape, and they hold: the capability table matches getCapabilities() down to explainFormat and the two allowlisted maintenance operations, the four label overrides are quoted exactly, and the error table matches mapLibSQLError() including the 400/401/403 set and the status 0 branch that carries host and port. The usage examples use real signatures, and describeObjects() really does answer { details }.

Section numbering now lands where #862 asked, on mongodb.md's shape, and nothing links to the anchors that moved, so the renumbering is safe.

One trivial note, no change needed: bun run format runs biome, which does not touch markdown, so that checkbox is a no-op for this file.

Worth saying plainly: this is your third PR here and the first to land, after #935 was closed on assignment grounds and #945 stood down for this one. Thank you for staying with it, and for picking the doc up at the standard rather than at the minimum.
See you next PR 👍

@cevheri
cevheri merged commit 5578a8d into libredb:main Sep 17, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs/providers/libsql.md is missing the Capabilities & labels, Error handling and Usage examples sections

2 participants