loopbackio / loopback-connector-couchdb2

LoopBack Connector for Couchdb
Other
12 stars 11 forks source link

Add global limit #42

Closed jannyHou closed 6 years ago

jannyHou commented 6 years ago

Description

Specify a config variable globalLimit in your datasource file:

myCloudantDs: {
  url: <a_url>,
  database: <a_database>,
  globalLimit: 100
}

It will override the default limit(which is 25) in cloudant database.

Please note: The query level imit in function Foo.find({limit: <a_query_level_limit>}), should override the globalLimit, which is not implemented in this quick fix PR.

The precedence is:

Related issues

This is a quick PR to fix https://github.com/strongloop/loopback-connector-couchdb2/issues/41 Please double check this feature and enable the globalLimit in other related methods in https://github.com/strongloop/loopback-connector-couchdb2/issues/39

Checklist

jannyHou commented 6 years ago

@b-admike Thanks feedback applied. PTAL again.

jannyHou commented 6 years ago

@b-admike This is a quick fix for #41 to unblock the customer's release, we still need to improve this feature in #39, I will leave the invalid value check there :-p