Skip to content

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 17, 2025

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

coderabbitai bot commented Oct 17, 2025

Walkthrough

Adds Zig documentation: a new docs/connect/zig.md guide for using the pg.zig driver and a Zig grid-item-card plus toctree entry in docs/connect/index.md. No runtime code changes.

Changes

Cohort / File(s) Summary
Connect index update
docs/connect/index.md
Added a Zig driver card under "Drivers by language" (logo zig-logo.png at 50px, link connect-zig, link-type ref, alt text, padding and styling classes) and added Zig to the "All drivers" toctree/navigation.
Zig driver documentation
docs/connect/zig.md
Added a new guide covering overview, about, synopsis, fetching pg.zig, build snippet, Pool initialization, a SELECT query example, result iteration, cleanup, Cloud/sslmode notes, and related links.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (Zig)
    participant Lib as pg.zig
    participant DB as CrateDB

    rect #E8F5E9
    Dev->>Lib: initialize Pool(conn string, params)
    Lib-->>Dev: Pool instance
    end

    rect #FFF3E0
    Dev->>Lib: execute query (SELECT ...)
    Lib->>DB: run SQL over Postgres wire protocol
    DB-->>Lib: result rows
    Lib-->>Dev: iterator/rows
    end

    rect #E3F2FD
    Dev->>Lib: close Pool / cleanup
    Lib-->>DB: close connections
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

guidance, cross linking

Suggested reviewers

  • kneth
  • surister

Poem

🐰 A zig in the docs with a hop and a grin,
I tuck pg.zig where connections begin.
Pools bubble softly, queries dance free,
Rows roll in neatly — a carrot for me! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive The pull request description states "What the title says" followed by a preview link. While this phrase technically references the PR title (which does align with the changeset—adding a Zig driver documentation page), the description itself is extremely vague and generic, containing no substantive information about what changes were made. The phrase "What the title says" is a non-descriptive placeholder that fails to convey meaningful information about the actual modifications to the codebase, such as the new zig.md documentation file or updates to the index.md navigation. Consider providing a more descriptive pull request description that explains the specific changes made, such as noting that the PR adds a new Zig driver documentation page with examples and usage instructions, and updates the driver index. This would help reviewers understand the scope and intent of the changes at a glance without needing to review the preview or full changeset.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Driver: Add page about Zig" directly and clearly summarizes the main change in the changeset. The raw summary shows that the pull request adds a new Zig driver documentation page (docs/connect/zig.md) and updates the index to include Zig in the navigation. The title is concise, specific, and would allow a teammate scanning the commit history to immediately understand that this change introduces driver documentation for Zig. The title is fully aligned with the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch zig

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.

coderabbitai[bot]

This comment was marked as duplicate.

@amotl amotl added new content New content being added. and removed cross linking Linking to different locations of the documentation. labels Oct 18, 2025
@amotl amotl force-pushed the zig branch 3 times, most recently from 4722c90 to 12be5ca Compare October 18, 2025 22:23
Comment on lines +74 to +77
```shell
zig fetch --save git+https://github.com/karlseguin/pg.zig#master
zig build
./zig-out/bin/example
```
Copy link
Member Author

Choose a reason for hiding this comment

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

What about zig run? Maybe revisit on a future iteration?

Copy link
Member Author

@amotl amotl Oct 19, 2025

Choose a reason for hiding this comment

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

It looks like zig run isn't able to pick up the dependencies properly. Maybe we need to extend the library search path of any kind?

$ zig run example.zig
example.zig:4:20: error: no module named 'pg' available within module 'example'
const pg = @import("pg");
                   ^~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new content New content being added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant