refactor: remove Phase X terminology from source code comments
Remove planning document phase references from code comments: app_test.go: - Remove Phase 5 references from 8 test function comments querier.go & queries.sql.go: - Remove Phase 1, 2, 3, 4, 6 references from section headers - Clean up week numbers (Weeks 5-6, Week 3-4, etc.) queries.sql: - Remove Phase 4 references from Kobo queries kobo.go: - Remove Phase 6 references from ContentId mapping comments progress.go: - Remove Phase 1 reference from route comment media_scanner.go & media_scanner_library_type_test.go: - Remove Phase 2 references from library type scanning comments schema.sql: - Remove Phase 1, 2, 3, 4, 5, 7 references from table/section comments - Clean up: Format Detection, Progress Tracking, Device Registry, Sync Queue, Conflict Resolution, Reading History, Indexes, etc. test_helpers.go: - Remove Phase 6 reference from handler setup comment These phase numbers were from internal planning documents and have no meaning in the codebase. Removing them makes the code self-documenting.
This commit is contained in:
@@ -60,7 +60,7 @@ type AddBookToKoboShelfParams struct {
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// KOBO SHELF MANAGEMENT QUERIES (Phase 4)
|
||||
// KOBO SHELF MANAGEMENT QUERIES
|
||||
// ============================================
|
||||
func (q *Queries) AddBookToKoboShelf(ctx context.Context, arg AddBookToKoboShelfParams) (KoboShelves, error) {
|
||||
row := q.db.QueryRow(ctx, AddBookToKoboShelf,
|
||||
@@ -292,7 +292,7 @@ type CreateDeviceParams struct {
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// PHASE 2: DEVICE MANAGEMENT & AUTH (Weeks 5-6)
|
||||
// DEVICE MANAGEMENT & AUTH
|
||||
// ============================================
|
||||
// Device Registration & Management
|
||||
func (q *Queries) CreateDevice(ctx context.Context, arg CreateDeviceParams) (Devices, error) {
|
||||
@@ -837,7 +837,7 @@ type CreateOrUpdateKoboEntitlementParams struct {
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// KOBO ENTITLEMENT QUERIES (Phase 4)
|
||||
// KOBO ENTITLEMENT QUERIES
|
||||
// ============================================
|
||||
func (q *Queries) CreateOrUpdateKoboEntitlement(ctx context.Context, arg CreateOrUpdateKoboEntitlementParams) (KoboEntitlements, error) {
|
||||
row := q.db.QueryRow(ctx, CreateOrUpdateKoboEntitlement,
|
||||
@@ -1084,7 +1084,7 @@ type CreateUnlinkedBookParams struct {
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// PHASE 6: ENHANCED KOBO SYNC (Week 3-4)
|
||||
// ENHANCED KOBO SYNC
|
||||
// ============================================
|
||||
// Create unlinked book entry
|
||||
func (q *Queries) CreateUnlinkedBook(ctx context.Context, arg CreateUnlinkedBookParams) (UnlinkedBooks, error) {
|
||||
@@ -2902,7 +2902,7 @@ SELECT id, library_id, title, author, isbn, description, file_path, file_size, m
|
||||
`
|
||||
|
||||
// ============================================
|
||||
// PHASE 3: KOREADER SYNC PROTOCOL (Weeks 7-9)
|
||||
// KOREADER SYNC PROTOCOL
|
||||
// ============================================
|
||||
func (q *Queries) GetMediaItemByFilePathForSync(ctx context.Context, filePath string) (MediaItems, error) {
|
||||
row := q.db.QueryRow(ctx, GetMediaItemByFilePathForSync, filePath)
|
||||
@@ -3407,8 +3407,8 @@ func (q *Queries) GetMediaRatings(ctx context.Context, mediaItemID pgtype.UUID)
|
||||
}
|
||||
|
||||
const GetNextRetryTime = `-- name: GetNextRetryTime :one
|
||||
SELECT
|
||||
CASE
|
||||
SELECT
|
||||
CASE
|
||||
WHEN attempts = 0 THEN NOW()
|
||||
WHEN attempts = 1 THEN NOW() + INTERVAL '1 minute'
|
||||
WHEN attempts = 2 THEN NOW() + INTERVAL '5 minutes'
|
||||
@@ -4053,7 +4053,7 @@ func (q *Queries) GetUnlinkedBooksByDevice(ctx context.Context, deviceID pgtype.
|
||||
}
|
||||
|
||||
const GetUser = `-- name: GetUser :one
|
||||
SELECT
|
||||
SELECT
|
||||
u.id,
|
||||
u.email,
|
||||
u.username,
|
||||
@@ -4602,7 +4602,7 @@ const IncrementSyncQueueAttempts = `-- name: IncrementSyncQueueAttempts :one
|
||||
UPDATE sync_queue
|
||||
SET
|
||||
attempts = attempts + 1,
|
||||
status = CASE
|
||||
status = CASE
|
||||
WHEN attempts + 1 >= max_attempts THEN 'failed'
|
||||
ELSE 'pending'
|
||||
END,
|
||||
@@ -4716,7 +4716,7 @@ func (q *Queries) LinkUnlinkedBook(ctx context.Context, arg LinkUnlinkedBookPara
|
||||
}
|
||||
|
||||
const ListAllSyncQueueItems = `-- name: ListAllSyncQueueItems :many
|
||||
SELECT
|
||||
SELECT
|
||||
sq.id, sq.device_id, sq.media_item_id, sq.sync_type, sq.sync_data, sq.priority, sq.attempts, sq.max_attempts, sq.status, sq.error_message, sq.created_at, sq.processed_at,
|
||||
d.device_name,
|
||||
d.device_type,
|
||||
@@ -5776,7 +5776,7 @@ func (q *Queries) ListUnresolvedUnlinkedBooks(ctx context.Context, arg ListUnres
|
||||
}
|
||||
|
||||
const ListUsers = `-- name: ListUsers :many
|
||||
SELECT
|
||||
SELECT
|
||||
u.id,
|
||||
u.email,
|
||||
u.username,
|
||||
@@ -7175,7 +7175,7 @@ type UpdateMediaItemFormatGroupParams struct {
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// PHASE 1: FORMAT DETECTION & PROGRESS (Week 2)
|
||||
// FORMAT DETECTION & PROGRESS
|
||||
// ============================================
|
||||
// Update media item format group information
|
||||
func (q *Queries) UpdateMediaItemFormatGroup(ctx context.Context, arg UpdateMediaItemFormatGroupParams) error {
|
||||
@@ -7215,7 +7215,7 @@ type UpdateMediaItemIdentifiersParams struct {
|
||||
|
||||
// Media Items Admin Operations
|
||||
// ============================================
|
||||
// PHASE 1: UNIVERSAL BOOK IDENTIFIERS (Week 1)
|
||||
// UNIVERSAL BOOK IDENTIFIERS
|
||||
// ============================================
|
||||
// Update media item with universal identifiers
|
||||
func (q *Queries) UpdateMediaItemIdentifiers(ctx context.Context, arg UpdateMediaItemIdentifiersParams) (MediaItems, error) {
|
||||
|
||||
Reference in New Issue
Block a user