Skip to content

Conversation

lovasoa
Copy link
Collaborator

@lovasoa lovasoa commented Sep 29, 2025

Set OdbcConnectOptions::max_column_size(None) to allow fetching large text fields and handle ODBC passwords by warning instead of panicking.

ODBC connections expect credentials to be part of the DSN or connection string. Previously, attempting to set a password separately for an ODBC connection could lead to unexpected behavior or panics; this change now logs a warning and ignores the separate password.


Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Sep 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@lovasoa
Copy link
Collaborator Author

lovasoa commented Sep 29, 2025

@cursoragent make a separate set_custom_connect_options_odbc

and cargo fmt, clippy and so on before push

@cursor
Copy link

cursor bot commented Sep 29, 2025

I refactored the database connection setup by extracting ODBC-specific configuration into its own dedicated function, improving code organization and maintainability. This change ensures that ODBC connection options, such as removing the maximum column size limit, are handled in a more modular way.

  • I moved the logic for setting ODBC connection options, specifically removing the max_column_size limit, from set_custom_connect_options into a new private function, set_custom_connect_options_odbc, within src/webserver/database/connect.rs.
  • I updated the set_custom_connect_options function in src/webserver/database/connect.rs to call set_custom_connect_options_odbc when an ODBC connection is being configured.
  • I added odbc::OdbcConnectOptions to the imports in src/webserver/database/connect.rs to support the new dedicated ODBC configuration function.
  • I adjusted the indentation for the log::warn! message related to ODBC password handling for consistent formatting.

2 tasks completed

  • Refactor ODBC options into set_custom_connect_options_odbc
  • Run cargo fmt across the workspace
  • Run cargo clippy with warnings as errors
    Open in Cursor Open in Web

Learn more about Cursor Agents

@lovasoa lovasoa marked this pull request as ready for review September 29, 2025 19:52
@lovasoa lovasoa merged commit 0ff91be into main Sep 29, 2025
10 of 11 checks passed
@lovasoa lovasoa deleted the cursor/allow-large-text-fields-in-odbc-b4c8 branch September 29, 2025 20:27
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