You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/03/02 08:08:54 UTC

[GitHub] [shardingsphere] soulasuna opened a new pull request #15753: Set charset extended protocol supported in proxy

soulasuna opened a new pull request #15753:
URL: https://github.com/apache/shardingsphere/pull/15753


   ## Set charset extended protocol supported in proxy
   
   Related to #13317.
   
   Changes proposed in this pull request:
   - Set charset extended protocol supported for PostgreSQL.
   - Refactor Set charset backend handler.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] soulasuna commented on a change in pull request #15753: Set charset extended protocol supported in proxy

Posted by GitBox <gi...@apache.org>.
soulasuna commented on a change in pull request #15753:
URL: https://github.com/apache/shardingsphere/pull/15753#discussion_r817480312



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/response/header/update/ClientEncodingResponseHeader.java
##########
@@ -20,18 +20,26 @@
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader;
-import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
 
+import java.util.Optional;
+
+/**
+ * Client encoding response header.
+ */
 @RequiredArgsConstructor
-@Getter
 public class ClientEncodingResponseHeader implements ResponseHeader {
     
-    private final String name;
-    
-    private final String value;
+    private final String currentCharsetValue;
     
-    private final SQLStatement sqlStatement;
+    @Getter
+    private final String inputValue;
     
-    private final ConnectionSession connectionSession;
+    /**
+     * Get current charset value.
+     *
+     * @return current charset value
+     */
+    public Optional<String> getCurrentCharsetValue() {
+        return null == currentCharsetValue ? Optional.empty() : Optional.of(currentCharsetValue);

Review comment:
       I will fix it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN commented on a change in pull request #15753: Set charset extended protocol supported in proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on a change in pull request #15753:
URL: https://github.com/apache/shardingsphere/pull/15753#discussion_r817475284



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/response/header/update/ClientEncodingResponseHeader.java
##########
@@ -20,18 +20,26 @@
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader;
-import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
 
+import java.util.Optional;
+
+/**
+ * Client encoding response header.
+ */
 @RequiredArgsConstructor
-@Getter
 public class ClientEncodingResponseHeader implements ResponseHeader {
     
-    private final String name;
-    
-    private final String value;
+    private final String currentCharsetValue;
     
-    private final SQLStatement sqlStatement;
+    @Getter
+    private final String inputValue;
     
-    private final ConnectionSession connectionSession;
+    /**
+     * Get current charset value.
+     *
+     * @return current charset value
+     */
+    public Optional<String> getCurrentCharsetValue() {
+        return null == currentCharsetValue ? Optional.empty() : Optional.of(currentCharsetValue);

Review comment:
       ```suggestion
           return Optional.ofNullable(currentCharsetValue);
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN merged pull request #15753: Set charset extended protocol supported in proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN merged pull request #15753:
URL: https://github.com/apache/shardingsphere/pull/15753


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org