Skip to content

Commit

Permalink
[Docs] Added a note for our IRC channel to the readme. Added further …
Browse files Browse the repository at this point in the history
…examples for MySQL.
  • Loading branch information
Jack12816 committed Sep 17, 2013
1 parent 3e87bac commit 454e9a5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -6,7 +6,9 @@ your application. Furthermore it standardizes an application directory structure
which helps you to manage large code bases.

For more details take a look at [greppy.org](http://greppy.org) or the
[Greppy API](http://greppy.org/docs).
[Greppy API](http://greppy.org/docs). If you got any problems, a wish to
contribute or to discuss new features take a look at our #greppy IRC channel on
freenode.

## Features

Expand Down
32 changes: 32 additions & 0 deletions docs/examples/db/02_mysql.md
Expand Up @@ -13,3 +13,35 @@
console.log(models);
});

### Fetch groups of entities in parallel

greppy.helper.get('db.sql.entities').fetchGroups([
{
name: "groupName1",
criteria: {
where: {deleted_at: null}
},
models: [
models.Product,
models.Portal
]
}
], function(err, groups) {

console.log(groups);
});

### Fetch all entities in parallel

greppy.db.get('mysql.mdc').getORM(function(orm, models) {

greppy.helper.get('db.sql.entities').fetchAll([
models.Product,
models.Portal,
models.Operator
], function(err, entities) {

console.log(entities);
});
});

0 comments on commit 454e9a5

Please sign in to comment.