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

This pull request adds Crystal driver documentation to CrateDB, introducing a new grid card in the drivers index and a comprehensive Crystal-specific connection guide with installation instructions, code examples, and SSL configuration details.

Changes

Cohort / File(s) Summary
Drivers index expansion
docs/connect/index.md
Adds Crystal as a new grid-item-card under the "Drivers by language" section with corresponding logo, link, and alt text; extends toctree to include crystal/index
Crystal driver documentation
docs/connect/crystal/index.md
New documentation page covering Crystal database connectivity: includes prerequisites, shard.yml configuration, example code using crystal-pg via crystal-db, installation and execution commands, SSL connection setup with auth methods, and references to Crystal database driver resources

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

cross linking

Suggested reviewers

  • surister
  • seut

Poem

🐰✨ A crystal shines in the docs so bright,
New guides for drivers, a beautiful sight!
From index.md to pages brand new,
Connection examples, Crystal comes through! 💎

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Driver: Add page about Crystal' clearly and specifically describes the main change: adding documentation for connecting to CrateDB from Crystal applications.
Description check ✅ Passed The description relates to the changeset by confirming the addition of a Crystal driver page, though it is minimal and relies on the title to convey the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch crystal

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.

Comment on lines 49 to 60
:::{rubric} CrateDB Cloud
:::

For connecting to CrateDB Cloud, use `sslmode=require&auth_methods=cleartext`
parameters, and replace username, password and hostname with values matching
your environment.
```crystal
DB.open("postgres://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require&auth_methods=cleartext")
```
Copy link
Member Author

@amotl amotl Oct 18, 2025

Choose a reason for hiding this comment

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

Problem

When not permitting auth_methods=cleartext, the connection will fail, because cleartext is disabled by default.

Unhandled exception:  (DB::ConnectionRefused)
Caused by: server asked for disabled authentication method: cleartext (PQ::ConnectionError)

Background

By default this driver will accept scram-sha-256 and md5, as well as
trust. However cleartext is disabled by default. You can control exactly
which auth methods the client will accept by passing in a comma separated list
to the auth_methods parameter.

-- https://github.com/will/crystal-pg/blob/c5b8ac1ac5713fc58f974d8a4327887a0b297594/README.md?plain=1#L164-L169

Thoughts

Do you think it is applicable to report this to crate/crate, so it may possibly support md5 or scram-sha-256 in the future?

/cc @matriv, @seut

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've created a ticket about this, so we can proceed.

@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 crystal branch 2 times, most recently from 712b0cb to c3c3791 Compare October 21, 2025 13:05
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.

@amotl amotl marked this pull request as draft January 22, 2026 02:30
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.

3 participants