contrib/starrocks-python-client/cursor.md
This document provides context and guidance for the AI assistant (Cursor) when collaborating on the starrocks-python-client project.
starrocks-python-clientstarrocks/dialect.py: Core implementation of the SQLAlchemy Dialect, responsible for SQL dialect translation, connection management, and execution.starrocks/reflection.py: Responsible for database object "reflection," i.e., reading metadata of tables, views, indexes, etc., from a StarRocks database.starrocks/alembic/: Specific implementation for Alembic integration, used for handling the autogeneration and execution of database migration scripts.test/: Directory for unit and integration tests.Our current primary goal is to enhance support for StarRocks-specific features in SQLAlchemy and Alembic. This includes, but is not limited to:
BITMAP, HLL, and JSON.engine, distribution, order by, properties).autogenerate process to accurately detect and generate change scripts for these attributes.Please follow these standards and procedures when assisting with development:
Design First: Before any coding, please provide a design outline that includes:
Clarity and Conciseness: For any functional design or modification, a concise and clear design document is required before implementation begins.
Coding Standards:
TestAlterTableIntegration), please follow this field order: engine, key, comment, partition, distribution, order by, properties. [[memory:8012332]]Testing Requirements:
pytest.pytest test/ command to run all tests.To ensure the project's design, testing strategies, and usage are well-documented and kept up-to-date, we will maintain a set of living documents under the docs/ directory. This practice is crucial for developers, reviewers, and the AI assistant to have a shared understanding of the project.
The AI assistant is expected to help draft and update these documents as part of the development workflow.
Key Documents:
docs/design/: Contains the high-level architecture and detailed design of important modules, functions, and workflows.docs/test/: Outlines the testing strategy, including test ideas, key test cases, and coverage goals.docs/usage_guide/: Provides comprehensive usage guides and detailed API references for all user-facing features.Documentation Workflow:
docs/design/.docs/test/ before or during implementation.docs/usage_guide/ must be updated to reflect the changes and provide clear instructions for users.How to Use This Information:
docs/design/ when implementing new features to ensure alignment with the intended architecture.docs/design/ and docs/test/ as references for writing comprehensive and relevant test cases.docs/usage_guide/ is the primary source of truth for understanding how to use the client.setup.py.