This is an automated email from the ASF dual-hosted git repository. glynnbird pushed a commit to branch issue103 in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git
commit c35166d34528da27a46fe4ef266b16e074e443ff Author: Glynn Bird <[email protected]> AuthorDate: Mon Aug 20 15:20:34 2018 +0100 removed spatial function - fixes issue #103 --- lib/nano.d.ts | 11 ----------- lib/nano.js | 6 ------ tests/unit/design/spatial.js | 28 ---------------------------- 3 files changed, 45 deletions(-) diff --git a/lib/nano.d.ts b/lib/nano.d.ts index e00befd..b6dd3ae 100644 --- a/lib/nano.d.ts +++ b/lib/nano.d.ts @@ -235,17 +235,6 @@ declare namespace nano { params: DocumentSearchParams, callback?: Callback<DocumentSearchResponse<V>> ): Request; - spatial( - ddoc: string, - viewname: string, - callback?: Callback<any> - ): Promise<any>; - spatial( - ddoc: string, - viewname: string, - params: any, - callback?: Callback<any> - ): Promise<any>; // http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view // http://docs.couchdb.org/en/latest/api/ddoc/views.html#post--db-_design-ddoc-_view-view view<V>( diff --git a/lib/nano.js b/lib/nano.js index 8809f90..572c9d9 100644 --- a/lib/nano.js +++ b/lib/nano.js @@ -667,11 +667,6 @@ module.exports = exports = function dbScope (cfg) { return view(ddoc, viewName, {type: 'view', stream: true}, qs, callback) } - // geocouch - function viewSpatial (ddoc, viewName, qs, callback) { - return view(ddoc, viewName, {type: 'spatial'}, qs, callback) - } - // cloudant function viewSearch (ddoc, viewName, qs, callback) { return view(ddoc, viewName, {type: 'search'}, qs, callback) @@ -912,7 +907,6 @@ module.exports = exports = function dbScope (cfg) { updateWithHandler: updateWithHandler, search: viewSearch, searchAsStream: viewSearchAsStream, - spatial: viewSpatial, view: viewDocs, viewAsStream: viewDocsAsStream, find: find, diff --git a/tests/unit/design/spatial.js b/tests/unit/design/spatial.js deleted file mode 100644 index da02d1b..0000000 --- a/tests/unit/design/spatial.js +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the 'License'); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -'use strict' - -const geoDesign = require('../../helpers/unit').unit([ - 'view', - 'spatial' -]) - -geoDesign('people', 'byArea', {x: '1'}, { - headers: { - accept: 'application/json', - 'content-type': 'application/json' - }, - method: 'GET', - qs: {x: '1'}, - uri: '/mock/_design/people/_spatial/byArea' -})
