[Initial stub post, clean up later]
After reviewing the code for mysql-js on Github, we determined that the two keys needed to be passed in via JSON format.
Find Command:
session.find(<tableObject>, <key[s]>, <callback method>);
Example with single column key:
session.find(Employee, '110183', onFind);
Example with Composite key:
To find employee 110183 who is the manager for the department d003 the following code works:
session.find(deptMan.DepartmentManager, {dept_no:'d003',emp_no:'110183'}, onFind);
The key is formatting the keys like this: {dept_no:'d003',emp_no:'110183'}
No comments:
Post a Comment