Deletes rows from the table matching the where clause
Returns the number of affected rows
767368
public function deleteFrom(string $table, array $where): int
    {
        $delete = new Delete($this->options);
        $sqlParams = $delete->buildQuery($table, $where);
        return $this->query($sqlParams->getSql(), $sqlParams->getParams())->getAffected();
    }
1167314
public static int delete(Connection connection, String table, String where,
			String[] args) {
		StringBuilder delete = new StringBuilder();
		delete.append("delete from ").append(CoreSQLUtils.quoteWrap(table));
		if (where != null) {
			delete.append(" where ").append(where);
		}
		String sql = delete.toString();

		PreparedStatement statement = null;

		int count = 0;
		try {
			statement = connection.prepareStatement(sql);
			setArguments(statement, args);
			count = statement.executeUpdate();
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to execute SQL delete statement: " + sql, e);
		} finally {
			closeStatement(statement, sql);
		}

		return count;
	}
321132
def delete(self, table, where=None):
        """"""
        if where:
            where_key, where_val = where
            query = "DELETE FROM {0} WHERE {1}='{2}'".format(wrap(table), where_key, where_val)
        else:
            query = 'DELETE FROM {0}'.format(wrap(table))
        self.execute(query)
        return True
783753
def count(self):
        
        cmd = ("select COUNT(*) from {table} "
               "{join_clause}{where_clause}{order_clause}").format(
                    table=self.table_name,
                    where_clause=self.where_clause,
                    join_clause=self.join_clause,
                    order_clause=self.order_clause).rstrip()
        return Repo.db.execute(cmd, self.where_values)
491053
def remove(self, filter=None):
        
        sql = build_delete(table_name=self.name, condition=filter)
        return self.cursor.execute(sql)
273577
function delete( $table, $where = array(), $params = array() ) {

        if ( !is_array( $where ) ) $where = array( $where );
        if ( !is_array( $params ) ) $params = array_slice( func_get_args(), 2 );

        $table = $this->rewriteTable( $table );
        $query = "DELETE FROM " . $this->quoteIdentifier( $table );
        $query .= $this->getSuffix( $where );

        $this->onQuery( $query, $params );

        $statement = $this->prepare( $query );
        $statement->execute( $params );

        return $statement;

    }
41358
public static function delete($table, $where = null) {
        if ($where) {
            Delete::delete($table, $where);
        } else {
            return Delete::table($table);
        }
        return null;
    }
989697
def delete
      if self.class.hooks[:active]
        self.class.hooks[:before_delete].each do |block|
          self.class.hooks[:active] = false
          block.yield self
          self.class.hooks[:active] = true
        end
      end

      st = prepare("DELETE FROM #{table} WHERE #{pk_clause}")
      num_deleted = st.execute( *pk_values ).affected_count
      st.finish
      if num_deleted != 1
        false
      else
        if self.class.hooks[:active]
          self.class.hooks[:after_delete].each do |block|
            self.class.hooks[:active] = false
            block.yield self
            self.class.hooks[:active] = true
          end
        end
        true
      end
    end
724586
public int delete(TRow row) {
		int numDeleted;
		if (row.hasId()) {
			numDeleted = deleteById(row.getId());
		} else {
			numDeleted = delete(buildValueWhere(row.getAsMap()),
					buildWhereArgs(row.getValues()));
		}
		return numDeleted;
	}
363316
public function foundRows()
    {
        if ($this->hasOption('SQL_CALC_FOUND_ROWS')) {
            return (int) $this->owner->getOne('select found_rows()');
        }
        /* db-compatible way: */
        $c = clone $this;
        $c->del('limit');

        return (int) $c->fieldQuery('count(*)')->getOne();
    }
1335791
public int deleteAll() throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();
		int deleted = db.delete();

		return deleted;
	}
526651
public static function delete($table,$where=[])
    {
        $bind=[];
        if(empty($where)){
            $where='';
        }else{
            $w=new Where($where);
            $where=' WHERE '.$w->parseWhere();
            $bind=array_merge($bind,$w->parseBind());
        }
        $sql=sprintf('DELETE FROM `:%s` %s',$table,$where);
        $bind=array_merge($bind,$bind);
        return self::execute($sql,$bind);
    }
1278559
function delete($table, $where, $where_params)
    {
        $sql = "DELETE FROM " . $table . $this->buildWhere($where);
        $stmt = $this->executeQuery($sql, $where_params);

        return $stmt;
    }
797139
def delete(self,removed):
        
        sql = "DELETE FROM %s " %self.name
        if isinstance(removed,dict):
            # remove a single record
            _id = removed['__id__']
            sql += "WHERE rowid = ?"
            args = (_id,)
        else:
            # convert iterable into a list (to be able to sort it)
            removed = [ r for r in removed ]
            if not removed:
                return 0
            args = [ r['__id__'] for r in removed ]
            sql += "WHERE rowid IN (%s)" %(','.join(['?']*len(args)))
        self.cursor.execute(sql,args)
        return len(removed)
640251
final public function delete( array $where, $table = '', $place_holders = [] ) {
		if ( ! $place_holders ) {
			try {
				$place_holders = $this->get_place_holders( $where );
			} catch ( \Exception $e ) {
				return false;
			}
		}
		return $this->db->delete( $table ?: $this->table, $where, $place_holders );
	}
634936
public <T> int del(Entity where) throws SQLException {
		if (CollectionUtil.isEmpty(where)) {
			return 0;
		}
		return db.del(fixEntity(where));
	}
935398
def delete *where
    sql, *binds = SQLHelper.delete(:table => name, :where => @query_where + where, :prepared => true)
    pstmt = prepare :delete, sql
    pstmt.send @update_method, *binds
  end