Skip to content

v0.9.1

Choose a tag to compare

@cwt cwt released this 11 Sep 07:57
· 75 commits to main since this release

NeoSQLite v0.9.1 Release Notes

Overview

This release focuses on code organization improvements and bug fixes. The primary enhancement involves refactoring the index management functionality to properly delegate all search index operations from the Collection class to the IndexManager class, improving code maintainability and consistency. Additionally, several minor bug fixes and code cleanup improvements have been implemented.

Highlights

Improved Code Organization

  • Index Management Refactoring: All search index methods (create_search_index, create_search_indexes, list_search_indexes, update_search_index, and drop_search_index) have been properly delegated from the Collection class to the IndexManager class, following the established pattern for other index operations
  • Consistent API Implementation: The Collection class now consistently delegates all index-related operations to the IndexManager, improving code organization and maintainability
  • Reduced Code Duplication: Search index functionality is now implemented in a single location (IndexManager) rather than being duplicated between the Collection and IndexManager classes

Code Quality Improvements

  • Bug Fixes: Fixed undefined variable issues related to import statements in example files
  • Code Cleanup: Removed unnecessary import statements and fixed linting issues with ruff
  • Improved Maintainability: Better organized code structure makes the codebase more approachable for new contributors

New Features

Index Management Enhancements

  • Proper Delegation Pattern: All search index methods in the Collection class now properly delegate to the corresponding methods in the IndexManager class:
    • create_search_index() now delegates to IndexManager.create_search_index()
    • create_search_indexes() now delegates to IndexManager.create_search_indexes()
    • list_search_indexes() now delegates to IndexManager.list_search_indexes()
    • update_search_index() now delegates to IndexManager.update_search_index()
    • drop_search_index() now delegates to IndexManager.drop_search_index()

Code Quality Improvements

  • Import Statement Cleanup: Removed unused import statements from example files
  • Linting Fixes: Fixed various linting issues identified by ruff
  • Variable Scope Fixes: Resolved undefined variable issues in example code

Performance Improvements

  • Memory Efficiency: Reduced memory footprint by removing unnecessary import statements
  • Improved Code Maintainability: Better organized code structure leads to more efficient development and debugging

Technical Benefits

  • Better Code Organization: All index-related functionality is now consistently located in the IndexManager class
  • Enhanced Maintainability: Improved code structure makes it easier to maintain and extend index functionality
  • Reduced Code Duplication: Eliminated duplicated code between Collection and IndexManager classes
  • Improved Testability: Centralized index management functionality makes it easier to test and verify behavior
  • Backward Compatibility: All existing APIs remain accessible through the same import paths

Breaking Changes

There are no intentional breaking changes in this release. All existing APIs and functionality remain fully compatible with previous versions.

Installation

# Standard installation
pip install neosqlite

# For enhanced JSON/JSONB support
pip install neosqlite[jsonb]

# For memory-constrained processing of large result sets
pip install neosqlite[memory-constrained]

# Install multiple extras
pip install neosqlite[jsonb,memory-constrained]

Notable Features

Improved Index Management Example

# Search index operations now properly delegate to IndexManager
# All of these methods now delegate to the IndexManager:

# Create FTS search indexes for text search
users.create_search_index('bio')
users.create_search_indexes(['title', 'content', 'description'])

# List search indexes
indexes = users.list_search_indexes()

# Drop a search index
users.drop_search_index('bio')

# Update a search index (drops and recreates)
users.update_search_index('content')

Consistent API Usage Example

# All index operations now follow the same delegation pattern:
# Simple indexes
users.create_index('name')
users.drop_index('name')
users.list_indexes()

# Search indexes
users.create_search_index('bio')
users.drop_search_index('bio')
users.list_search_indexes()

# All delegate to the IndexManager internally

This release represents a refinement of NeoSQLite's architecture with improved code organization and maintainability while maintaining full backward compatibility. The refactoring of index management functionality centralizes all index-related operations in the IndexManager class, making the codebase more consistent and easier to maintain.