Library Improvements#9
Merged
Merged
Conversation
…kSession with prepare and execute_async methods
…complex type casting and filtering
…eter ordering; add tests for prepared statement binding and error handling
…table errors across parser modules; add tests for error scenarios
…andling; update schema on create and drop operations; add tests for metadata reflection and queryability.
…schema; add tests for index creation and reflection
…s and corresponding tests for keyspace and index deletion
…ng, update schema management, and enhance table alteration options; include tests for materialized view operations and option updates.
- Added `MockMetadata`, `MockKeyspaceMetadata`, `MockTableMetadata`, `MockMaterializedViewMetadata`, and `MockColumnMetadata` to represent metadata structures. - Introduced `MockScyllaDB` for mocking ScyllaDB connections and session management. - Created `MockSession`, `MockResponseFuture`, and `MockCluster` to simulate session behavior and asynchronous execution. - Developed `ScyllaState` to manage in-memory state and keyspace/table structures. - Implemented statement handling with `MockPreparedStatement`, `MockBoundStatement`, and `MockBatchStatement`. - Added utility functions for parameter extraction and coercion. - Established a module structure for better organization and accessibility of mock components.
… operations, async queries, and introspecting state
…a separate function for improved readability and maintainability.
…yspace, table, column, index, and view rows in a structured manner; improve readability and maintainability.
…ed readability and maintainability; streamline query parsing logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request reorganizes the
mockyllapackage to move all implementation code into a newmockylla/classes/subpackage, introduces internal module boundaries, and adds comprehensive documentation and usage examples. The public API is now re-exported from the top-levelmockylla/__init__.py, and new example files provide focused walkthroughs for users.Key changes include:
Package Restructuring and Refactoring
mockylla/__init__.pyinto themed modules undermockylla/classes/(e.g.,state.py,statements.py,session.py,metadata.py,scylladb.py), improving maintainability and clarity. The public API is now re-exported from the top-level__init__.py.metadata.pyfor metadata facades,scylladb.pyfor the context manager and decorator, andsession.pyfor session and cluster mocks.Documentation and Examples
README.mdto include new sections: "Examples" (with links to walkthroughs) and "Package Structure" (explaining the new module layout).examples/demonstrating basic usage, prepared statements, batch operations, async queries, and introspecting in-memory state.These changes make the codebase easier to navigate, clarify internal APIs, and provide users with more accessible documentation and practical examples.