Skip to content

Library Improvements#9

Merged
rohaquinlop merged 17 commits into
mainfrom
feature-enhance-implmentation
Sep 24, 2025
Merged

Library Improvements#9
rohaquinlop merged 17 commits into
mainfrom
feature-enhance-implmentation

Conversation

@rohaquinlop
Copy link
Copy Markdown
Collaborator

This pull request reorganizes the mockylla package to move all implementation code into a new mockylla/classes/ subpackage, introduces internal module boundaries, and adds comprehensive documentation and usage examples. The public API is now re-exported from the top-level mockylla/__init__.py, and new example files provide focused walkthroughs for users.

Key changes include:

Package Restructuring and Refactoring

  • Moved all implementation classes and helpers from mockylla/__init__.py into themed modules under mockylla/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.
  • Added new internal modules: metadata.py for metadata facades, scylladb.py for the context manager and decorator, and session.py for session and cluster mocks.

Documentation and Examples

  • Updated README.md to include new sections: "Examples" (with links to walkthroughs) and "Package Structure" (explaining the new module layout).
  • Added five new example files under 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.

…kSession with prepare and execute_async methods
…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.
@rohaquinlop rohaquinlop merged commit d64eb5d into main Sep 24, 2025
16 checks passed
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.

1 participant