delete the word or phrase from database.
351616
def delete_word(word):
    ''''''

    conn = sqlite3.connect(os.path.join(DEFAULT_PATH, 'word.db'))
    curs = conn.cursor()
    # search fisrt
    curs.execute('SELECT expl, pr FROM Word WHERE name = "%s"' % word)
    res = curs.fetchall()

    if res:
        try:
            curs.execute('DELETE FROM Word WHERE name = "%s"' % word)
        except Exception as e:
            print(e)
        else:
            print(colored('%s has been deleted from database' % word, 'green'))
            conn.commit()
        finally:
            curs.close()
            conn.close()
    else:
        print(colored('%s not exists in the database' % word, 'white', 'on_red'))
336388
def flush(self):
        """"""
        keys = list(self.keys())
        if keys:
            return self.database.delete(*keys)
246487
def delete(self, records, context):
        
        # include various schema records to remove
        DELETE = self.statement('DELETE')
        sql, data = DELETE(records, context)

        if context.dryRun:
            print sql % data
            return 0
        else:
            return self.execute(sql, data, writeAccess=True)
423978
def delete(cls, uuid):
        """"""
        to_delete = Workflow.query.get(uuid)
        db.session.delete(to_delete)
1165796
function(service, phrase) {
      Keyword.destroy({ service: service, phrase: phrase}, function(err) {
        // error
        if (err) {
          hb.errors.emit('error', whatError(err));
          return false;
        }

        // cool beans
        Switchboard.delegateKeyword('remove', { service: service, phrase: phrase});
        return true;
      });
    }
618609
public function remove() {
        if (is_array($this->_fields)) {
            $this->_fields = implode($fields, ', ');
        }
        
        // Build Select Command
        $sql_query = 'DELETE FROM ' . $this->_table;
        
        // Where statements
        if (count($this->_where)) {
            $sql_query .= ' WHERE ';
            $sql_query .= implode($this->_where, ' AND ');
            
            // or statements
            if (count($this->_or)) {
                $sql_query .= ' OR ';
                $sql_query .= implode($this->_or, ' AND ');
            }
        }
        
        // Set the query
        $this->_sql_query = $sql_query;
        
        return $this;
    }
795720
def clean(self):
        
        self.exec_pg_success(['dropdb', '-U', self.user, self.database])
        self.exec_pg_success(['createdb', '-U', self.user, self.database])
189724
void delete() {
        StringBuilder sql = new StringBuilder();
        sql.append("DROP SCHEMA ");
        sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(this.name));
        if (this.sqlgGraph.getSqlDialect().supportsCascade()) {
            sql.append(" CASCADE");
        }
        if (this.sqlgGraph.getSqlDialect().needsSemicolon()) {
            sql.append(";");
        }
        if (logger.isDebugEnabled()) {
            logger.debug(sql.toString());
        }
        Connection conn = this.sqlgGraph.tx().getConnection();
        try (Statement stmt = conn.createStatement()) {
            stmt.execute(sql.toString());
        } catch (SQLException e) {
            logger.error("schema deletion failed " + this.sqlgGraph.toString(), e);
            throw new RuntimeException(e);
        }
    }
1359563
def _delete(self):
        """"""
        try:
            for record in self._records:
                try:
                    self._records[record]._delete()
                except AttributeError:
                    pass
        except AttributeError:
            pass
1240400
def erase(self):
        """"""
        with self._at_last_line():
            self.stream.write(self._term.clear_eol)
        self.stream.flush()
752365
def delete(self, key):
        """"""
        if not self.debug:
            self.database.delete(self.make_key(key))
853860
def delete(self, table, where, values = ()) :
		""""""
		sql = 'DELETE FROM %s WHERE %s' % (table, where)
		return self.execute(sql, values)
283455
public function destroy()
    {
        // delete DB
        $sql = sprintf(
            'DROP TABLE `%s`;',
            $this->mysql->quote($this->section)
        );

        if (false === $this->mysql->exec($sql)) {

            $this->throwException(
                'Unable to delete the database: ',
                $this->mysql->errorInfo()
            );
        }

        $this->registry[$this->section] = array();
    }
492651
def remove(self, statement_text):
        
        Statement = self.get_model('statement')
        session = self.Session()

        query = session.query(Statement).filter_by(text=statement_text)
        record = query.first()

        session.delete(record)

        self._session_finish(session)
528821
protected function purgeOldCodesFromDatabase()
    {
        if ($this->use_database && $this->pdo_conn) {
            $now   = time();
            $limit = (!is_numeric($this->expiry_time) || $this->expiry_time < 1) ? 86400 : $this->expiry_time;

            $query = sprintf("DELETE FROM %s WHERE %s - created > %s",
                             $this->database_table,
                             $now,
                             $this->pdo_conn->quote("$limit", PDO::PARAM_INT));

            $result = $this->pdo_conn->query($query);
        }
    }
1098758
def delete(self):
        """"""
        pipeline = self.db.pipeline()
        self._delete_from_indices(pipeline)
        self._delete_membership(pipeline)
        pipeline.delete(self.key())
        pipeline.execute()
856036
private function removeRemarks($sql)
    {
        $i = 0;
    
        while ($i < mb_strlen($sql)) {
            if (mb_substr($sql,$i,1) == '#' && ($i == 0 || mb_substr($sql,$i-1,1) == "\n")) {
                $j = 1;
                while (mb_substr($sql,$i+$j,1) != "\n") {
                    $j++;
                    if ($j+$i > mb_strlen($sql)) {
                        break;
                    }
                } // end while
                $sql = mb_substr($sql, 0, $i) . mb_substr($sql, $i+$j);
            } // end if
            $i++;
        } // end while
    
        return $sql;
    }