Last active
August 2, 2017 03:58
-
-
Save goooooouwa/3a7a9bf6b1608bf6ab180caf094fea02 to your computer and use it in GitHub Desktop.
demo on how to use node.js orm to find all records and match text with LIKE. 关于如何使用node.js orm查询全部记录和LIKE文本匹配的demo。 https://github.com/dresende/node-orm2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// how to find all Person records | |
// 如何查找所有人的记录 | |
Person.find() // or Person.all() | |
// how to find Person records with surname beginning with word "Gr" | |
// 如何查找surname以“Gr"字母开头的人的记录 | |
Person.find({ surname: orm.like("Gr" + "%") }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment