Here's an example of how we sometimes want to use this code to query the database even in the absence of a running node-datasource:
https://github.com/xtuple/xtuple/blob/master/scripts/cycle_extension_test.js#L17