Skip to content

Fix and improve TypeScript declaration#369

Merged
dresende merged 2 commits intodresende:masterfrom
nerdzeu:master
Nov 8, 2013
Merged

Fix and improve TypeScript declaration#369
dresende merged 2 commits intodresende:masterfrom
nerdzeu:master

Conversation

@nerdzeu
Copy link
Contributor

@nerdzeu nerdzeu commented Nov 2, 2013

Now we can use helper functions like orm.ge, orm.like, ecc in Find and sqlquery is a vaild typescript module delclaration.

Commit 2:
Now it's possible to do thing like

req.models["users"].find({ "counter": orm.lte(25) }).each((user) => {
console.log(user["counter"]);
});
req.models["users"].find({ "counter": orm.between(1, 205)
}).each().filter((user) => {
return (user["counter"] % 2) === 0;
}).count((num) => {
console.log("Users with counter between 1 and 205 and with even counter:
"+ num);
});

Now we can use helper functions like orm.ge, orm.like, ecc in Find
Now it's possible to do thing like
```TypeScript
req.models["users"].find({ "counter": orm.lte(25) }).each((user) => {
console.log(user["counter"]);
});
req.models["users"].find({ "counter": orm.between(1, 205)
}).each().filter((user) => {
return (user["counter"] % 2) === 0;
}).count((num) => {
console.log("Users with counter between 1 and 205 and with even counter:
"+ num);
});
```
dresende added a commit that referenced this pull request Nov 8, 2013
Fix and improve TypeScript declaration
@dresende dresende merged commit f8e238c into dresende:master Nov 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants