couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From glynnb...@apache.org
Subject [couchdb-nano] branch master updated: removed spatial function - fixes issue #103 (#117)
Date Tue, 21 Aug 2018 11:41:05 GMT
This is an automated email from the ASF dual-hosted git repository.

glynnbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git


The following commit(s) were added to refs/heads/master by this push:
     new f69ab4f  removed spatial function - fixes issue #103 (#117)
f69ab4f is described below

commit f69ab4f13fccd1f1a4d675a18cd901e8208972c5
Author: Glynn Bird <glynn.bird@gmail.com>
AuthorDate: Tue Aug 21 12:41:02 2018 +0100

    removed spatial function - fixes issue #103 (#117)
---
 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'
-})


Mime
View raw message