Skip to content

Conversation

@lovasoa
Copy link
Collaborator

@lovasoa lovasoa commented Sep 19, 2025

Add initial Snowflake support to SQLx, including core driver traits, basic type system, and an HTTP connection framework.

This PR lays the foundational architecture for the Snowflake driver, implementing the necessary SQLx traits and an HTTP client for the Snowflake SQL API. While the authentication currently uses a dummy JWT key and full result parsing is not yet implemented, the module compiles, passes basic structural tests, and successfully establishes HTTP communication with a Snowflake instance, providing a solid base for further development.


Open in Cursor Open in Web

cursoragent and others added 2 commits September 19, 2025 15:42
This commit introduces the initial implementation of the Snowflake driver for SQLx. It includes the core database driver architecture, connection management, basic authentication framework, and example usage. The changes also encompass updates to the workspace configuration, Cargo.toml, and the addition of new files for documentation and examples.

Co-authored-by: contact <[email protected]>
@cursor
Copy link

cursor bot commented Sep 19, 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 19, 2025

@cursoragent Make sure to run cargo clippy and cargo fmt before each commit. Make sure to test everything locally.

@cursor
Copy link

cursor bot commented Sep 19, 2025

⌛ Working on 16 tasks

  • Research and understand Snowflake SQL API architecture, authentication methods, and request/response formats
  • Set up Snowflake feature flags and dependencies in Cargo.toml files
  • Create basic Snowflake module structure following SQLx patterns
  • Implement Snowflake database struct and core Database trait
  • Implement TypeInfo, Value, ValueRef for Snowflake data types
  • Implement JWT-based authentication for Snowflake SQL API
  • Implement Connection trait with HTTP client for REST API calls
  • Implement Arguments trait for parameter binding in Snowflake
  • Implement Executor trait for query execution via REST API
  • Implement Row and Column traits for result set handling
  • Implement Statement trait for prepared statements (if supported)
  • Implement transaction management for Snowflake
  • Implement comprehensive error handling and conversion
  • Integrate Snowflake driver with Any driver for runtime selection
  • Create integration tests and CI setup for Snowflake
  • Create examples and comprehensive documentation

Open in Cursor Open in Web

@lovasoa
Copy link
Collaborator Author

lovasoa commented Sep 19, 2025

@cursoragent , for local testing and on ci, you can use https://github.com/tekumara/fakesnow

And the Any driver integration is mandatory.

@cursor
Copy link

cursor bot commented Sep 19, 2025

⌛ Working on 3 tasks

  • Complete mandatory Any driver integration for Snowflake
  • Set up fakesnow for local testing and CI
  • Add tests for Any driver with Snowflake support

Open in Cursor Open in Web

@lovasoa
Copy link
Collaborator Author

lovasoa commented Sep 19, 2025

@cursoragent make sure your code is tested on ci

and run ci checks locally too

cargo clippy --manifest-path sqlx-core/Cargo.toml
--no-default-features
--features offline,all-databases,all-types,migrate,runtime-tokio-rustls
-- -D warnings

cursoragent and others added 2 commits September 19, 2025 18:17
Integrates Snowflake as a database option within the Any driver, enabling unified database access. This includes updates to connection management, type handling, and query execution.

Co-authored-by: contact <[email protected]>
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.

3 participants