@@ -1036,7 +1036,7 @@ module.exports = exports = function dbScope (cfg) {
1036
1036
1037
1037
return relax ( {
1038
1038
db : dbName ,
1039
- path : '_partition/' + partitionKey
1039
+ path : '_partition/' + encodeURIComponent ( partitionKey )
1040
1040
} , callback )
1041
1041
}
1042
1042
@@ -1047,15 +1047,15 @@ module.exports = exports = function dbScope (cfg) {
1047
1047
}
1048
1048
return relax ( {
1049
1049
db : dbName ,
1050
- path : '_partition/' + partitionKey + '/_all_docs' ,
1050
+ path : '_partition/' + encodeURIComponent ( partitionKey ) + '/_all_docs' ,
1051
1051
qs : opts
1052
1052
} , callback )
1053
1053
}
1054
1054
1055
1055
function partitionedListAsStream ( partitionKey , qs ) {
1056
1056
return relax ( {
1057
1057
db : dbName ,
1058
- path : '_partition/' + partitionKey + '/_all_docs' ,
1058
+ path : '_partition/' + encodeURIComponent ( partitionKey ) + '/_all_docs' ,
1059
1059
qs : qs ,
1060
1060
stream : true
1061
1061
} )
@@ -1068,7 +1068,7 @@ module.exports = exports = function dbScope (cfg) {
1068
1068
1069
1069
return relax ( {
1070
1070
db : dbName ,
1071
- path : '_partition/' + partition + '/_find' ,
1071
+ path : '_partition/' + encodeURIComponent ( partition ) + '/_find' ,
1072
1072
method : 'POST' ,
1073
1073
body : query
1074
1074
} , callback )
@@ -1077,7 +1077,7 @@ module.exports = exports = function dbScope (cfg) {
1077
1077
function partitionedFindAsStream ( partition , query ) {
1078
1078
return relax ( {
1079
1079
db : dbName ,
1080
- path : '_partition/' + partition + '/_find' ,
1080
+ path : '_partition/' + encodeURIComponent ( partition ) + '/_find' ,
1081
1081
method : 'POST' ,
1082
1082
body : query ,
1083
1083
stream : true
@@ -1090,15 +1090,15 @@ module.exports = exports = function dbScope (cfg) {
1090
1090
}
1091
1091
return relax ( {
1092
1092
db : dbName ,
1093
- path : '_partition/' + partition + '/_design/' + ddoc + '/_search/' + searchName ,
1093
+ path : '_partition/' + encodeURIComponent ( partition ) + '/_design/' + ddoc + '/_search/' + searchName ,
1094
1094
qs : opts
1095
1095
} , callback )
1096
1096
}
1097
1097
1098
1098
function partitionedSearchAsStream ( partition , ddoc , searchName , opts ) {
1099
1099
return relax ( {
1100
1100
db : dbName ,
1101
- path : '_partition/' + partition + '/_design/' + ddoc + '/_search/' + searchName ,
1101
+ path : '_partition/' + encodeURIComponent ( partition ) + '/_design/' + ddoc + '/_search/' + searchName ,
1102
1102
qs : opts ,
1103
1103
stream : true
1104
1104
} )
@@ -1110,15 +1110,15 @@ module.exports = exports = function dbScope (cfg) {
1110
1110
}
1111
1111
return relax ( {
1112
1112
db : dbName ,
1113
- path : '_partition/' + partition + '/_design/' + ddoc + '/_view/' + viewName ,
1113
+ path : '_partition/' + encodeURIComponent ( partition ) + '/_design/' + ddoc + '/_view/' + viewName ,
1114
1114
qs : opts
1115
1115
} , callback )
1116
1116
}
1117
1117
1118
1118
function partitionedViewAsStream ( partition , ddoc , viewName , opts ) {
1119
1119
return relax ( {
1120
1120
db : dbName ,
1121
- path : '_partition/' + partition + '/_design/' + ddoc + '/_view/' + viewName ,
1121
+ path : '_partition/' + encodeURIComponent ( partition ) + '/_design/' + ddoc + '/_view/' + viewName ,
1122
1122
qs : opts ,
1123
1123
stream : true
1124
1124
} )
0 commit comments