-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feathers-loopback-connector plugin #556
Comments
@kethan, I'll try to look soon. What is the benefit that this adapter will provide? |
@marshallswain Yes you are right it will work with all the databases listed and any other built for future too will work. Example for MongoDB var loopbackConnector = require('feathers-loopback-connector');
var DataSource = require('loopback-datasource-juggler').DataSource;
var ModelBuilder = require('loopback-datasource-juggler').ModelBuilder;
var ds = new DataSource({
connector: require('loopback-connector-mongodb'),
host: 'localhost',
port: 27017,
database: 'mydb'
});
var MessageSchema = ds.createModel('message', {
title: { type: String },
body: { type: String }
});
app.use('/messages', loopbackConnector({
Model: MessageSchema,
paginate: {
default: 2,
max: 4
}
}));
module.exports = app.listen(3030); Cassandra connector |
@kethan This looks great, nice job! I can definitely help with the failing tests. Can I just clone your repository and run the tests to see what is happening or is there any setup involved? |
@daffl I am just a beginner and I learned seeing many of your repo you are an expert friend. You can just clone it and run the tests. But please note the code is not perfect and optimised as yours. |
@marshallswain Did you check? was it useful? |
@kethan Yep I cloned it and it looks great (sorry, I've been meaning to reply earlier but I was hoping I could just make a PR but didn't get a chance yet)! I can see why those tests are failing. Do you know if nested |
@daffl Thanks. //it should be like this
or : [
or: [conditions],
or: [conditions],
]
//From loopback docs
//Example using the “or” operator to finds posts that either have title of “My Post” or content of “Hello”.
Post.find({where: {or: [{title: 'My Post'}, {content: 'Hello'}]}},
function (err, posts) {
...
});
//More complex example. The following expresses (field1= foo and field2=bar) OR field1=morefoo:
{
or: [
{ and: [{ field1: 'foo' }, { field2: 'bar' }] },
{ field1: 'morefoo' }
]
} |
Thanks again for sharing this! I'm closing this issue since I never used Loopback and unfortunately don't have the time to look into it more. I added it to our Feathers list though. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs. |
Hi All,
I am sorry to post here and it is not an issue with feathers
https://github.com/kethan/feathers-loopback-connector.
This is my first attempt to create a feathers plugin. I created for loopback-connector.
Still, it is in alpha stage.
Can anyone look at the code and give their feedback.
I tried running feathers-service-tests I am having 4 issues can anyone help me resolve it.
Thanks.
The text was updated successfully, but these errors were encountered: