Comparing version 6.4.2 to 6.4.3
@@ -764,2 +764,11 @@ // Licensed under the Apache License, Version 2.0 (the 'License'); you may not | ||
function createIndex(indexDef, callback) { | ||
return relax({ | ||
db: dbName, | ||
path: '_index', | ||
method: 'POST', | ||
body: indexDef | ||
}, callback); | ||
} | ||
// db level exports | ||
@@ -810,2 +819,3 @@ docScope = { | ||
find: find, | ||
createIndex: createIndex, | ||
viewWithList: viewWithList, | ||
@@ -812,0 +822,0 @@ server: serverScope, |
@@ -7,3 +7,3 @@ { | ||
"repository": "http://github.com/apache/couchdb-nano", | ||
"version": "6.4.2", | ||
"version": "6.4.3", | ||
"author": "Apache CouchDB <dev@couchdb.apache.org> (http://couchdb.apache.org)", | ||
@@ -21,4 +21,4 @@ "keywords": [ | ||
"dependencies": { | ||
"request": "^2.76.0", | ||
"cloudant-follow": "^0.13.0", | ||
"request": "~2.83.0", | ||
"cloudant-follow": "~0.16.1", | ||
"errs": "^0.3.2", | ||
@@ -25,0 +25,0 @@ "underscore": "^1.8.3", |
@@ -36,5 +36,5 @@ [![Build Status](https://travis-ci.org/apache/couchdb-nano.svg?branch=master)](https://travis-ci.org/apache/couchdb-nano)![Coverage](https://img.shields.io/badge/coverage-100%-ff69b4.svg)[![dependencies Status](https://david-dm.org/apache/couchdb-nano/status.svg)](https://david-dm.org/apache/couchdb-nano)[![NPM](http://img.shields.io/npm/v/nano.svg?style=flat-square)](https://www.npmjs.com/package/nano) | ||
- [nano.db.replicate(source, target, [opts], [callback])](#nanodbreplicatesource-target-opts-callback) | ||
- [nano.db.replication.enable(source, target, [opts], [callback])](#nanodbreplicatorenablesource-target-opts-callback) | ||
- [nano.db.replication.query(id, [opts], [callback])](#nanodbreplicatorquery-id-opts-callback) | ||
- [nano.db.replication.disable(id, [opts], [callback])](#nanodbreplicatordisable-id-opts-callback) | ||
- [nano.db.replication.enable(source, target, [opts], [callback])](#nanodbreplicationenablesource-target-opts-callback) | ||
- [nano.db.replication.query(id, [opts], [callback])](#nanodbreplicationenablesource-target-opts-callback) | ||
- [nano.db.replication.disable(id, [opts], [callback])](#nanodbreplicationdisableid-opts-callback) | ||
- [nano.db.changes(name, [params], [callback])](#nanodbchangesname-params-callback) | ||
@@ -57,3 +57,4 @@ - [nano.db.follow(name, [params], [callback])](#nanodbfollowname-params-callback) | ||
- [db.fetch(docnames, [params], [callback])](#dbfetchdocnames-params-callback) | ||
- [db.fetchRevs(docnames, [params], [callback])](#dbfetchRevsdocnames-params-callback) | ||
- [db.fetchRevs(docnames, [params], [callback])](#dbfetchrevsdocnames-params-callback) | ||
- [db.createIndex(indexDef, [callback])](#dbcreateindexindexdef-callback) | ||
- [Multipart functions](#multipart-functions) | ||
@@ -382,3 +383,3 @@ - [db.multipart.insert(doc, attachments, [params], [callback])](#dbmultipartinsertdoc-attachments-params-callback) | ||
if (!err) { | ||
console.log('got database info'', body); | ||
console.log('got database info', body); | ||
} | ||
@@ -621,2 +622,17 @@ }); | ||
### db.createIndex(indexDef, [callback]) | ||
Create index on database fields, as specified in | ||
[CouchDB doc](http://docs.couchdb.org/en/latest/api/database/find.html#db-index). | ||
```js | ||
var indexDef = { | ||
index: { fields: ['foo'] }, | ||
name: 'fooindex' | ||
}; | ||
alice.createIndex(indexDef, function(err, result) { | ||
console.log(result); | ||
}); | ||
``` | ||
## Multipart functions | ||
@@ -623,0 +639,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
243231
132
5629
1040
+ Addedajv@5.5.2(transitive)
+ Addedboom@4.3.15.3.3(transitive)
+ Addedcloudant-follow@0.16.1(transitive)
+ Addedcryptiles@3.2.1(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedfast-deep-equal@1.1.0(transitive)
+ Addedhar-validator@5.0.3(transitive)
+ Addedhawk@6.0.2(transitive)
+ Addedhoek@4.3.1(transitive)
+ Addedjson-schema-traverse@0.3.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addedrequest@2.83.0(transitive)
+ Addedsntp@2.1.0(transitive)
- Removedajv@4.11.86.12.6(transitive)
- Removedassert-plus@0.2.0(transitive)
- Removedaws-sign2@0.6.0(transitive)
- Removedboom@2.10.1(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcloudant-follow@0.13.0(transitive)
- Removedcryptiles@2.0.5(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedform-data@2.1.4(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhar-schema@1.0.5(transitive)
- Removedhar-validator@4.2.15.1.5(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhawk@3.1.3(transitive)
- Removedhoek@2.16.3(transitive)
- Removedhttp-signature@1.1.1(transitive)
- Removedisarray@2.0.5(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stable-stringify@1.1.1(transitive)
- Removedjsonify@0.0.1(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedperformance-now@0.2.0(transitive)
- Removedpsl@1.10.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.4.1(transitive)
- Removedrequest@2.81.02.88.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedsntp@1.0.9(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removeduri-js@4.4.1(transitive)
Updatedcloudant-follow@~0.16.1
Updatedrequest@~2.83.0