Skip to content

Instantly share code, notes, and snippets.

@goooooouwa
Last active August 2, 2017 03:58
Show Gist options
  • Save goooooouwa/3a7a9bf6b1608bf6ab180caf094fea02 to your computer and use it in GitHub Desktop.
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
// 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