谁能帮我在 meteor nodets:mysql
包中编写自定义查询?
就像现在我正在尝试执行 query Parties.find();
但我如何才能从该包运行自定义 MySQL
查询。
最佳答案
查看文档我看到了这个:
Users = db.meteorCollection("users","usersCollection",criteria);
//criteria object offers you executing select queries to the mysql database.
//Use it if you need to return only specific columns or joined tables.
它不会进一步解释,但您可能只是将自定义 sql 放在条件中,例如
"SELECT * FROM TABLE WHERE ..."
我会尝试一下,看看你会得到什么。
否则使用这个包,它看起来更接近 SQL - https://github.com/numtel/meteor-mysql
关于javascript - meteor Node :mysql custom query,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40586591/