Comments (3)
@htammen do you still run into same error? Could you provide the filter you used? Thanks. We have a bunch of test cases for $regex
and they all pass.
from loopback-connector-cloudant.
Steps to verify:
- create basic LB app with model
model1
connected to cloudant datasource. - create following boot script following docs here:
'use strict';
module.exports = function(app) {
var myDs = app.datasources.cldntlocal;
function createMymodel() {
myDs.automigrate('model1', function(err) {
if (err)
console.error('failed to migrate model-1 ', err);
else {
console.log('model created');
insertModel();
}
});
};
function insertModel() {
var myModel = app.models.model1;
var testModel = {};
testModel.foo = '123456789';
var testModel2 = {foo: 'abcdefgh'};
myModel.create([testModel, testModel2], function(err) {
if (err)
console.log('Insert failed ', err);
else
console.log('insert successful');
myModel.find({where: {foo: {regexp: '^a'}}}, function(err, res) {
if (err)
console.log('find failed ', err);
else
console.log('find matching regexp: ', res);
});
});
};
myDs.once('connected', createMymodel);
};
results:
| => node .
Web server listening at: http://0.0.0.0:3000
Browse your REST API at http://0.0.0.0:3000/explorer
model created
insert successful
find only results: [ { _rev: '1-b14a0f9ea27028f1d5484da94d79a32d',
foo: 'abcdefgh',
id: '22d0f5a08ddaef4e34d8cacdf2014b9f' } ]
^C
from loopback-connector-cloudant.
connect to https://github.com/strongloop-internal/scrum-apex/issues/240
from loopback-connector-cloudant.
Related Issues (20)
- Out dated / error in dependancies HOT 2
- Count returns a max of 25 HOT 5
- Query "like and case insensitive" with issues HOT 7
- Add support Geospatial queries HOT 5
- Fix the filter for hasManyThrough relation HOT 2
- Fix CI - 2 test cases failed HOT 3
- Run shared tests from both v3 and v4 of juggler
- FindById doesn't use Cloudant Read by Id method HOT 8
- [Spike] Add Support for Partitioned Databases HOT 18
- Update driver to nodejs/cloudant HOT 5
- Support creating partitioned index HOT 1
- Optimize query by reading partition key from payload HOT 1
- Compose the _id for a document in a partition database HOT 3
- [Epic] Add Support for Partitioned Database HOT 2
- findAll: Read partitionKey from `options` HOT 3
- Optimize findById for partitioned database HOT 4
- [Epic] Add Support for Partitioned Database (Post MVP) HOT 5
- [Blog] Blog post about the support for partitioned database HOT 2
- Invalid key partitioned using with Cloudant docker locally HOT 6
- Move to @ibm-cloud/cloudant HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-connector-cloudant.