{"size": 367, "ext": "js", "max_stars_repo_path": "models/ds_operate.js", "max_stars_repo_name": "xanke/disney-etl", "max_stars_repo_stars_event_min_datetime": "2018-01-11T06:15:28.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-26T09:27:31.000Z", "max_issues_repo_path": "models/ds_operate.js", "max_issues_repo_name": "xanke/disney-etl", "max_issues_repo_issues_event_min_datetime": "2021-05-09T15:15:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-09T15:15:59.000Z", "max_forks_repo_path": "models/ds_operate.js", "max_forks_repo_name": "xanke/disney-etl", "max_forks_repo_forks_event_min_datetime": "2018-05-11T15:15:41.000Z", "max_forks_repo_forks_event_max_datetime": "2018-05-11T15:15:41.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 18.35, "max_line_length": 51, "alphanum_fraction": 0.5504087193}
const DsOperate = require('../lib/mongo').DsOperate

module.exports = {
  find: async data => {
    return DsOperate.find(data).exec()
  },
  findOne: async data => {
    return DsOperate.findOne(data).exec()
  },
  update: async (find, data) => {
    return DsOperate.update(
      find,
      { $set: data },
      {
        upsert: true
      }
    ).exec()
  }
}
