index.js 657 B

123456789101112131415161718
  1. 'use strict';
  2. const writeCommand = require('./write_command');
  3. module.exports = {
  4. insert: function insert(server, ns, ops, options, callback) {
  5. writeCommand(server, 'insert', 'documents', ns, ops, options, callback);
  6. },
  7. update: function update(server, ns, ops, options, callback) {
  8. writeCommand(server, 'update', 'updates', ns, ops, options, callback);
  9. },
  10. remove: function remove(server, ns, ops, options, callback) {
  11. writeCommand(server, 'delete', 'deletes', ns, ops, options, callback);
  12. },
  13. killCursors: require('./kill_cursors'),
  14. getMore: require('./get_more'),
  15. query: require('./query'),
  16. command: require('./command')
  17. };