Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mickamy
Copy link
Owner

@mickamy mickamy commented Oct 23, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 23, 2025 03:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors command handler signatures to accept a request object and Writer instead of separate command/args parameters, and introduces session support for multi-database functionality.

  • Introduces session management for per-connection state tracking
  • Changes handler function signature from func(cmd, args, w) to func(w, r)
  • Replaces single DB instance with a map of databases indexed by session's selected DB

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/session/session.go Adds new Session struct to track client connection state including selected database
internal/server/request.go Introduces request wrapper containing session, command, and arguments
internal/server/server.go Updates Server struct to use dbMap instead of single db, changes handler signatures, and adds db() helper method
internal/server/validator.go Changes validateCommand from Server method to standalone function
internal/server/errors.go Adds ErrUnknownSection error constant
internal/server/cmd_*.go Updates all command handlers to use new signature (w, r) instead of (cmd, args, w)
internal/server/cmd_*_test.go Updates tests to create request objects and use dbMap instead of single db
Makefile Adds test-e2e and test-all targets for improved test organization
.github/workflows/test.yml Updates CI workflow to run all tests using test-all target

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mickamy mickamy merged commit 9e37080 into main Oct 23, 2025
3 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.

2 participants