在MongoDB中,我需要能够在主文档内的数组内的文档中展开嵌套数组.
{
"_id" : ObjectId("5808d700536d1a3d69f4cf51"),
"last_name" : "Maity",
"xiith_mark" : 58,
"id" : "3539488",
"first_name" : "Harshavardhan",
"course_name" : "BE/B.Tech",
"institute_name_string" : "Abhayapuri College, P.O. Abhayapuri",
"profile_percentage" : 45,
"xiith_mark_type" : "Percentage",
"xth_mark_type" : "Percentage",
"date_of_birth" : "14-April-1993",
"xth_mark" : 30,
"last_login" : 1470827224,
"percentage" : 55,
"job_details" : [
{
"status" : NumberLong(6),
"applied_date" : NumberLong(1470831441),
"job_id" : NumberLong(92928),
"contact_viwed_status" : 0,
"label_name" : [
"shortlisted",
"rejected"
],
"questionnaire_status" : 0,
"batch_id" : NumberLong(6),
"call_letter" : NumberLong(812)
},
{ …Run Code Online (Sandbox Code Playgroud) transaction.commit_unless_managed()在python中有什么用?
我不太了解交易。在我的代码中我看到了一个函数 transaction.commit_unless_managed(),但我不知道有什么用commit_unless_managed()
transaction.commit_unless_managed()
Run Code Online (Sandbox Code Playgroud)
请解释一下有什么用commit_unless_managed()?
和正常commit和之间的区别commit_unless_managed()
我有一个mongodb,有很多收藏。
例如:
--mongo_db(数据库名称)
-aa
-bb
-cc(收藏集)
需要mongo_db中的集合数。在上述情况下,结果3
我怎样才能得到???