def delete(self, **context):
if not self.isRecord():<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>event = orb.events.DeleteEvent(record=self, context=self.context(**context))<EOL>if self.processEvent(event):<EOL><INDENT>self.onDelete(event)<EOL><DEDENT>if event.preventDefault:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>if self.__delayed:<EOL><INDENT>self.__delayed = False<EOL>self.read()<EOL><DEDENT>with WriteLocker(self.__dataLock):<EOL><INDENT>self.__loaded.clear()<EOL><DEDENT>context = self.context(**context)<EOL>conn = context.db.connection()<EOL>_, count = conn.delete([self], context)<EOL>if count == <NUM_LIT:1>:<EOL><INDENT>col = self.schema().column(self.schema().idColumn())<EOL>with WriteLocker(self.__dataLock):<EOL><INDENT>self.__values[col.name()] = (None, None)<EOL><DEDENT><DEDENT>return count<EOL>
Removes this record from the database.  If the dryRun \
flag is specified then the command will be logged and \
not executed.

:note       From version 0.6.0 on, this method now accepts a mutable
            keyword dictionary of values.  You can supply any member
            value for either the <orb.LookupOptions> or
            <orb.Context>, as well as the keyword 'lookup' to
            an instance of <orb.LookupOptions> and 'options' for
            an instance of the <orb.Context>

:return     <int>