Skip to content

Update Rust example to include non-admin logic and align with docs#131

Merged
wcmjunior merged 1 commit intomainfrom
chore/update-sqlx-samples
May 14, 2025
Merged

Update Rust example to include non-admin logic and align with docs#131
wcmjunior merged 1 commit intomainfrom
chore/update-sqlx-samples

Conversation

@danielfrankcom
Copy link
Copy Markdown
Contributor

This PR updates the Rust example.

It includes the following changes:

  • Synchronize the example with the publicly available docs here
  • Synchronize the example with other approved examples
    • Remove UUID generation
    • Use fixed telephone
    • Align create table DDL
  • Clean up and improve the documentation/comments
  • Minimize Cargo dependencies
  • Add non-admin connection to existing example
  • Integrate token refresh logic from rust/sqlx: Refresh the token every 10 minutes #124
  • Allow configuration with environment variables

I manually tested the token refresh logic by shortening the expiry duration, and changing the pool to lazily create connections. If I wait longer than the initial token expiry, then the pool can still connect lazily, indicating the token was refreshed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wcmjunior wcmjunior merged commit e419c78 into main May 14, 2025
3 checks passed
@wcmjunior wcmjunior deleted the chore/update-sqlx-samples branch May 14, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants