Split internal/storage/sqlite/sqlite.go (1050 lines) into focused files for better maintainability and code discovery: - store.go (306 lines): SQLiteStorage struct, New() constructor, initialization logic, and database utilities (Close, Path, IsClosed, UnderlyingDB, UnderlyingConn, CheckpointWAL) - queries.go (1173 lines): Issue CRUD operations including CreateIssue, GetIssue, GetIssueByExternalRef, UpdateIssue, UpdateIssueID, CloseIssue, DeleteIssue, DeleteIssues, SearchIssues with all helpers - config.go (95 lines): Configuration and metadata management (SetConfig, GetConfig, GetAllConfig, DeleteConfig, SetMetadata, GetMetadata) plus OrphanHandling type definitions - comments.go (83 lines): Comment operations (AddIssueComment, GetIssueComments) - sqlite.go (31 lines): Package documentation explaining file organization Additional changes: - Removed duplicate OrphanHandling definition from ids.go (was causing build error with new config.go) Impact: - Zero functional changes, all tests pass (2.6s runtime) - Improved code discovery: easy to locate specific functionality - Better maintainability: related code grouped logically - Reduced cognitive load: smaller, focused files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
1.5 KiB
Go
32 lines
1.5 KiB
Go
// Package sqlite implements the storage interface using SQLite.
|
|
//
|
|
// This package has been split into focused files for better maintainability:
|
|
//
|
|
// Core storage components:
|
|
// - store.go: SQLiteStorage struct, New() constructor, initialization logic,
|
|
// and database utility methods (Close, Path, IsClosed, UnderlyingDB, etc.)
|
|
// - queries.go: Issue CRUD operations including CreateIssue, GetIssue,
|
|
// UpdateIssue, DeleteIssue, DeleteIssues, SearchIssues
|
|
// - config.go: Configuration and metadata management (SetConfig, GetConfig,
|
|
// SetMetadata, GetMetadata, OrphanHandling)
|
|
// - comments.go: Comment operations (AddIssueComment, GetIssueComments)
|
|
//
|
|
// Supporting components:
|
|
// - schema.go: Database schema definitions
|
|
// - migrations.go: Schema migration logic
|
|
// - dependencies.go: Dependency management (AddDependency, RemoveDependency, etc.)
|
|
// - labels.go: Label operations
|
|
// - events.go: Event tracking
|
|
// - dirty.go: Dirty issue tracking for incremental exports
|
|
// - batch_ops.go: Batch operations for bulk imports
|
|
// - hash_ids.go: Hash-based ID generation
|
|
// - validators.go: Input validation functions
|
|
// - util.go: Utility functions
|
|
//
|
|
// Historical notes (bd-0a43):
|
|
// Prior to this refactoring, sqlite.go was 1050+ lines containing all storage logic.
|
|
// The monolithic structure made it difficult to navigate and understand specific
|
|
// functionality. This split maintains all existing functionality while improving
|
|
// code organization and discoverability.
|
|
package sqlite
|