本文整理汇总了Python中services.DatabaseManager.DatabaseManager.remove方法的典型用法代码示例。如果您正苦于以下问题:Python DatabaseManager.remove方法的具体用法?Python DatabaseManager.remove怎么用?Python DatabaseManager.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类services.DatabaseManager.DatabaseManager
的用法示例。
在下文中一共展示了DatabaseManager.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: delete
# 需要导入模块: from services.DatabaseManager import DatabaseManager [as 别名]
# 或者: from services.DatabaseManager.DatabaseManager import remove [as 别名]
def delete(cls, id):
db = DatabaseManager()
try:
security_group_to_remove = db.get_by_id(SecurityGroup, id)
except NotFoundException as e:
raise e
db.remove(security_group_to_remove)
return security_group_to_remove
示例2: delete
# 需要导入模块: from services.DatabaseManager import DatabaseManager [as 别名]
# 或者: from services.DatabaseManager.DatabaseManager import remove [as 别名]
def delete(cls, id):
db = DatabaseManager()
try:
service_to_remove = db.get_by_id(Service, id)
except NotFoundException as e:
raise e
db.remove(service_to_remove)
return service_to_remove
示例3: delete_rule
# 需要导入模块: from services.DatabaseManager import DatabaseManager [as 别名]
# 或者: from services.DatabaseManager.DatabaseManager import remove [as 别名]
def delete_rule(cls, id):
db = DatabaseManager()
try:
db.remove(db.get_by_id(Rule,id))
except NotFoundException as e:
raise e