class ShardingCTLSetBackendHandler implements TextProtocolBackendHandler {

    @Override
    public BackendResponse execute() {
        Optional<ShardingCTLSetStatement> shardingTCLStatement = new ShardingCTLSetParser(sql).doParse();
        if (!shardingTCLStatement.isPresent()) {
            throw new InvalidShardingCTLFormatException(sql);
        }
        if ("TRANSACTION_TYPE".equals(shardingTCLStatement.get().getKey())) {
            if (null == backendConnection.getSchemaName()) {
                throw new ShardingSphereException("Please select database, then switch transaction type.");
            }
            try {
                backendConnection.getTransactionStatus().setTransactionType(TransactionType.valueOf(shardingTCLStatement.get().getValue()));
            } catch (final IllegalArgumentException ex) {
                throw new UnsupportedShardingCTLTypeException(sql);
            }
        } else {
            throw new UnsupportedShardingCTLTypeException(sql);
        }
        return new UpdateResponse();
    }

    public  ShardingCTLSetBackendHandler(final String sql, final BackendConnection backendConnection);

}