Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Sun, 13 Apr 2025 08:06:12 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3592: Handle protocol 3.2 and wider cancel keys. In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 2041071194 X-GitHub-Comment-Type: review_comment X-GitHub-Commit: 4b3dc4a9751cec4747dac8261db56d31ebfe1165 X-GitHub-Issue: 3592 X-GitHub-Path: pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: review_comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3592#discussion_r2041071194 Content-Type: text/plain; charset=utf-8 (on pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java) WDYT of one of the following so it could return `ProtocolVersion` instance rather multiple minor/major getters? `getProtocolVersionInfo()` * Emphasizes that this is more than just a number now. * Common naming pattern when moving from primitive to object. `getProtocolVersionObject()` * Straightforward, explicitly communicates it's an object. `getProtocolVersionDetails()` * Suggests there might be more metadata than just a version number. `getProtocolVersionValue()` * Implies it's the full value, which works if the class holds major/minor etc. `getFullProtocolVersion()` * Indicates a more complete version compared to the basic int. `getProtocolVersionEx()` (or `getProtocolVersionExtended()`) * Simple, adds the "extended" idea, though a bit more API-looking.