Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Oct 16, 2025

@amotl amotl added the cross linking Linking to different locations of the documentation. label Oct 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

This pull request adds comprehensive Go driver documentation to CrateDB, introducing pgx, pq, and KSQL packages as connectivity options. It updates the main connect index page to include a new Go card and navigation entry, while creating dedicated documentation pages for each driver with usage examples, features, and cloud connection instructions.

Changes

Cohort / File(s) Summary
Navigation & Index
docs/connect/index.md
Adds Go grid item card under "Drivers by language" section with metadata, styling, and fab icon; adds Go entry to toctree alongside existing language drivers (java, javascript, php, python, ruby).
Go Driver Documentation
docs/connect/go/index.md, docs/connect/go/pgx.md, docs/connect/go/pq.md, docs/connect/go/ksql.md
New documentation files introducing Go connectivity options: main index page with driver overview and grid cards for pgx (recommended pure Go driver with 70+ PostgreSQL type support), pq (PostgreSQL database/sql driver in maintenance), and KSQL (adapter library). Each includes features, code examples, and CrateDB Cloud connection snippets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Multiple new documentation files require verification of code example correctness and functionality
  • Cross-references and links between pages should be validated
  • Consistency in formatting, structure, and tone across driver pages
  • Connection examples and cloud configuration details need accuracy review

Possibly related PRs

Suggested labels

guidance

Suggested reviewers

  • kneth
  • surister

Poem

🐰 A doc-hoppy day has come at last,
Go drivers now, both old and new!
pgx leads forward, pq's past,
KSQL too, through and through—
CrateDB's garden grows more true! 🌱

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Driver: Add page about Go" directly summarizes the main change in the changeset. The raw_summary confirms that the primary modification involves adding new Go driver documentation pages (docs/connect/go/index.md, pgx.md, pq.md, and ksql.md) along with updating the main connect documentation index to include Go navigation. The title is concise, specific, and clearly conveys the core purpose of this pull request without being vague or generic.
Description Check ✅ Passed The PR description, while minimal, is related to the changeset. It states "What the title says" and provides a preview link to the newly added Go documentation page (https://cratedb-guide--406.org.readthedocs.build/connect/go/), which directly corresponds to the files added in the changeset. Although the description lacks detail, it is not completely off-topic and does reference the actual content being added, satisfying the lenient criteria for this check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch go

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98061e8 and 776e417.

📒 Files selected for processing (5)
  • docs/connect/go/index.md (1 hunks)
  • docs/connect/go/ksql.md (1 hunks)
  • docs/connect/go/pgx.md (1 hunks)
  • docs/connect/go/pq.md (1 hunks)
  • docs/connect/index.md (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/connect/go/ksql.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/connect/go/pgx.md

86-86: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (6)
docs/connect/go/pq.md (1)

1-63: Documentation structure and content look solid.

The pq driver documentation follows a clear, consistent pattern with proper examples and clear instructions. The code examples are correct, connection strings are properly formatted, and the distinction between local and CrateDB Cloud connections is well-explained.

One minor note: The code example uses blank error assignments (line 27: db, _ := sql.Open(...)), which is a common simplification in documentation but can be worth adding a brief note that production code should handle errors properly. This is a very minor nitpick and the current approach is typical for docs examples.

docs/connect/go/index.md (1)

1-48: Well-structured Go driver index page.

The index page effectively organizes the three Go driver options with clear descriptions and proper cross-references. The context note (lines 12–14) about pgx being under active development versus pq in maintenance mode is valuable guidance for users choosing between drivers.

The grid layout, reference linking, and toctree structure are consistent with the documentation patterns for other language sections.

docs/connect/index.md (2)

52-62: Go card properly integrated into drivers grid.

The new Go language card is correctly placed alphabetically, uses consistent styling with other language cards, and properly links to the new Go index page. The icon choice and layout match the established pattern.


191-191: toctree entry correctly positioned.

The go/index entry is properly added in alphabetical order within the language drivers section of the toctree.

docs/connect/go/pgx.md (2)

1-95: Comprehensive pgx driver documentation with proper structure.

The documentation effectively covers pgx with a detailed features list, clear code examples showing context usage and proper resource cleanup, and proper cloud connection guidance. The CI badge (lines 4–8) adds transparency and demonstrates active maintenance. The code example appropriately demonstrates pgx-specific patterns like context handling and deferred cleanup.

Like the pq documentation, error handling is simplified (blank assignments) for brevity—standard for documentation examples.


86-86: Markdownlint bare URL warning is a false positive.

The static analysis tool flagged line 86 as a bare URL, but this URL is properly contained within a Sphinx/MyST card directive using the :link: attribute, so it is not actually a bare URL in the rendered documentation. This can be safely ignored.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl force-pushed the go branch 3 times, most recently from a5568d4 to 8f7a983 Compare October 16, 2025 10:47
@amotl amotl requested review from kneth and surister October 16, 2025 11:12
@kneth kneth mentioned this pull request Oct 17, 2025
Copy link
Member

@kneth kneth left a comment

Choose a reason for hiding this comment

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

We need to merge #415 before this PR can be merged

@amotl amotl force-pushed the go branch 2 times, most recently from 6e459e5 to 6e33ebd Compare October 17, 2025 15:25
coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl requested a review from kneth October 17, 2025 15:26
@amotl

This comment was marked as resolved.

Comment on lines 12 to 18
:::{rubric} About
:::

[pgx] is a pure Go driver and toolkit for PostgreSQL.
Copy link
Member Author

Choose a reason for hiding this comment

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

I just discovered lib/pq, a pure Go PostgreSQL driver for database/sql.

Copy link
Member Author

@amotl amotl Oct 20, 2025

Choose a reason for hiding this comment

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

0c1d156 adds information about it. /cc @coderabbitai

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Show the commit details for 0c1d156b9c
git show 0c1d156b9c

Length of output: 2003


@amotl, thanks for the heads up! I've reviewed commit 0c1d156.

Great addition! The documentation now covers both major PostgreSQL drivers for Go:

  • pgx: A more modern, feature-rich driver with advanced features like connection pooling
  • pq: The traditional, widely-adopted database/sql driver

The new pq section follows the same clear structure as the pgx section with:

  • Basic usage example showing standard database/sql patterns
  • Connection string examples for both local and CrateDB Cloud setups
  • Proper error handling guidance (using sslmode=disable for local, sslmode=require for cloud)

This gives users flexibility to choose based on their needs - pgx for more advanced features or pq for traditional database/sql compatibility. The documentation is comprehensive and consistent! 👍

coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl added the new content New content being added. label Oct 20, 2025
@amotl amotl force-pushed the go branch 3 times, most recently from 4d9dcc3 to 58488ca Compare October 21, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cross linking Linking to different locations of the documentation. new content New content being added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants