我有一个像这样的数据库:
var db = ScriptDb.getMyDb();
var ob = {
type: "employee",
employee_id: 1,
name: {
first: "Fatima",
initial: "S",
last: "Pauli"
},
address: {
street: "4076 Washington Avenue",
city: "Jackson", state: "MS", zip: "39201"
},
department_id: 52
};
var stored = db.save(ob);
现在我希望在employee_id
不循环整个现有数据库的情况下自动递增。
做这个的最好方式是什么?