本文整理匯總了Python中dNG.data.data_linker.DataLinker.delete方法的典型用法代碼示例。如果您正苦於以下問題:Python DataLinker.delete方法的具體用法?Python DataLinker.delete怎麽用?Python DataLinker.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dNG.data.data_linker.DataLinker
的用法示例。
在下文中一共展示了DataLinker.delete方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: delete
# 需要導入模塊: from dNG.data.data_linker import DataLinker [as 別名]
# 或者: from dNG.data.data_linker.DataLinker import delete [as 別名]
def delete(self):
"""
Deletes this entry from the database.
:since: v0.2.00
"""
if (self.log_handler is not None): self.log_handler.debug("#echo(__FILEPATH__)# -{0!r}.delete()- (#echo(__LINE__)#)", self, context = "pas_datalinker")
with self:
db_text_entry_instance = self.local.db_instance.rel_text_entry
DataLinker.delete(self)
if (db_text_entry_instance is not None): self.local.connection.delete(db_text_entry_instance)
示例2: delete
# 需要導入模塊: from dNG.data.data_linker import DataLinker [as 別名]
# 或者: from dNG.data.data_linker.DataLinker import delete [as 別名]
def delete(self):
"""
Deletes this entry from the database.
:since: v0.1.00
"""
with self, TransactionContext():
if (self.type & Entry.VFS_TYPE_DIRECTORY == Entry.VFS_TYPE_DIRECTORY):
for entry in self.get_content_list(): entry.delete()
#
db_resource_metadata_instance = self.local.db_instance.rel_resource_metadata
DataLinker.delete(self)
if (db_resource_metadata_instance is not None): self.local.connection.delete(db_resource_metadata_instance)