zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

pymongo创建索引

索引 创建 pymongo
2023-09-14 09:06:36 时间
from database import db
db_list = ["table1", "table2", "table3", "table4"]
for item in db_list:
    collection = db[item]
    collection.create_index([("phone", 1)])
    print(list(collection.index_information()))