Scans the entire UID table and removes any UIDMeta objects found.
@return The total number of columns deleted
168863
public Deferred<Long> purgeUIDMeta() {
    
    // a list to store all pending deletes so we don't exit before they've 
    // completed
    final ArrayList<Deferred<Object>> delete_calls = 
      new ArrayList<Deferred<Object>>();
    final Deferred<Long> result = new Deferred<Long>();
    
    /**
     * Scanner callback that will recursively call itself and loop through the
     * rows of the UID table, issuing delete requests for all of the columns in
     * a row that match a meta qualifier.
     */
    final class MetaScanner implements Callback<Deferred<Long>, 
      ArrayList<ArrayList<KeyValue>>> {

      final Scanner scanner;
      
      public MetaScanner() {
        scanner = getScanner(tsdb.uidTable());
      }
      
      /**
       * Fetches the next group of rows from the scanner and sets this class as
       * a callback
       * @return The total number of columns deleted after completion
       */
      public Deferred<Long> scan() {
        return scanner.nextRows().addCallbackDeferring(this);
      }
      
      @Override
      public Deferred<Long> call(ArrayList<ArrayList<KeyValue>> rows)
          throws Exception {
        if (rows == null) {
          result.callback(columns);
          return null;
        }
        
        for (final ArrayList<KeyValue> row : rows) {
          // one delete request per row. We'll almost always delete the whole
          // row, so preallocate some ram.
          ArrayList<byte[]> qualifiers = new ArrayList<byte[]>(row.size());
          
          for (KeyValue column : row) {
            if (Bytes.equals(TSMeta.META_QUALIFIER(), column.qualifier())) {
              qualifiers.add(column.qualifier());
            } else if (Bytes.equals("metric_meta".getBytes(CHARSET), 
                column.qualifier())) {
              qualifiers.add(column.qualifier());
            } else if (Bytes.equals("tagk_meta".getBytes(CHARSET), 
                column.qualifier())) {
              qualifiers.add(column.qualifier());
            } else if (Bytes.equals("tagv_meta".getBytes(CHARSET), 
                column.qualifier())) {
              qualifiers.add(column.qualifier());
            }
          }
          
          if (qualifiers.size() > 0) {
            columns += qualifiers.size();
            final DeleteRequest delete = new DeleteRequest(tsdb.uidTable(), 
                row.get(0).key(), NAME_FAMILY, 
                qualifiers.toArray(new byte[qualifiers.size()][]));
            delete_calls.add(tsdb.getClient().delete(delete));
          }
        }
        
        /**
         * Buffer callback used to wait on all of the delete calls for the
         * last set of rows returned from the scanner so we don't fill up the
         * deferreds array and OOM out.
         */
        final class ContinueCB implements Callback<Deferred<Long>, 
          ArrayList<Object>> {

          @Override
          public Deferred<Long> call(ArrayList<Object> deletes)
              throws Exception {
            LOG.debug("[" + thread_id + "] Processed [" + deletes.size() 
                + "] delete calls");
            delete_calls.clear();
            return scan();
          }
          
        }
        
        // fetch the next set of rows after waiting for current set of delete
        // requests to complete
        Deferred.group(delete_calls).addCallbackDeferring(new ContinueCB());
        return null;
      }
      
    }
    
    // start the scan
    new MetaScanner().scan();
    return result;
  }
339750
@Override
    public boolean isToBeDeleted()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(
                        tc,
                        "isToBeDeleted",
                        new Object[] { getName(), getUuid().toString() });
            SibTr.exit(tc, "isToBeDeleted", Boolean.valueOf(_toBeDeleted));
        }

        return _toBeDeleted;
    }
796351
public function count_null_id_columns()
        {
            if (Arrays::is($this->_getIdColumnName())) {
                return count(array_filter($this->id(), 'is_null'));
            } else {
                return is_null($this->id()) ? 1 : 0;
            }
        }
1217245
def _delete_null_columns(self):
        
        ds = DeleteStatement(self.column_family_name)
        deleted_fields = False
        for _, v in self.instance._values.items():
            col = v.column
            if v.deleted:
                ds.add_field(col.db_field_name)
                deleted_fields = True
            elif isinstance(col, Map):
                uc = MapDeleteClause(col.db_field_name, v.value, v.previous_value)
                if uc.get_context_size() > 0:
                    ds.add_field(uc)
                    deleted_fields = True

        if deleted_fields:
            for name, col in self.model._primary_keys.items():
                ds.add_where_clause(WhereClause(
                    col.db_field_name,
                    EqualsOperator(),
                    col.to_database(getattr(self.instance, name))
                ))
            self._execute(ds)
1235633
function() {
        var that = this;
        return CRUD.EntityManager.getAdapter().Delete(that).then(function(result) {
            if (result.Action == 'deleted') {
                CRUD.log(that.getType() + ' ' + that.getID() + ' has been deleted! ');
                delete CRUD.EntityManager.cache[that.getType()][that.getID()];
                that.__values__[CRUD.EntityManager.getPrimary(that.getType())].ID = false;
            }
            return result;
        });
    }
1140683
public function delete() : int
    {
        $table = $this->definition->getName();
        $sql = 'DELETE FROM '.$table.' ';
        $par = [];
        if (count($this->where)) {
            $sql .= 'WHERE ';
            $tmp = [];
            foreach ($this->where as $v) {
                $tmp[] = $v[0];
                $par = array_merge($par, $v[1]);
            }
            $sql .= implode(' AND ', $tmp) . ' ';
        }
        if (count($this->order)) {
            $sql .= $this->order[0];
            $par = array_merge($par, $this->order[1]);
        }
        return $this->db->query($sql, $par)->affected();
    }
160101
def columns_indeces_to_drop columns
      result = []
      headers = @table[0]
      headers.each_with_index do |header, i|
        result << i unless columns.include? header
      end
      result
    end
969714
private static int delete(final TSDB tsdb, final byte[] table,
      final String[] args) throws Exception {
    final String kind = args[1];
    final String name = args[2];
    try {
      tsdb.deleteUidAsync(kind, name).join();
    } catch (HBaseException e) {
      LOG.error("error while processing delete " + name, e);
      return 3;
    } catch (NoSuchUniqueName e) {
      LOG.error(e.getMessage());
      return 1;
    }
    LOG.info("UID " + kind + ' ' + name + " deleted.");
    return 0;
  }
262456
public int getIfdImagesCount() {
    int c = 0;
    if (metadata.contains("IFD")) {
      List<TiffObject> l = getMetadataList("IFD");
      int n = 0;
      for (TiffObject to : l) {
        if (to instanceof IFD) {
          IFD ifd = (IFD) to;
          if (ifd.isImage())
            n++;
        }
      }
      c = n;
    }
    return c;
  }
470955
public final String getClearDeletedMode() {

        // m_clearDeletedMode will be null in initial display because constructor triggers this before member initialization
        String result = m_clearDeletedMode;
        if (result == null) {
            result = MODE_CLEANDELETED_KEEP_RESTORE_VERSION;
        }
        return result;
    }
1151308
public String getTableAMultiplicity()
    {
        String ret = "many";
        List<ColumnInfo> tableAPKs = tableA.getPkList();

        if (tableAPKs.size() == 0 || tableA.getTableName().equals(tableB.getTableName()))
        {
            return ret;
        }
        if (tableAB == null)
        {
            List<ColumnInfo> fkColumns = this.getColumns();
            Set<ColumnInfo> columnSet = new HashSet<ColumnInfo>();
            columnSet.addAll(fkColumns);
            columnSet.removeAll(tableAPKs);
            if (fkColumns.size() == tableAPKs.size() && columnSet.isEmpty())
            {
                ret = "one";
                return ret;
            }
        }
        for (ForeignKey tableBFK : tableB.getForeignKeys().values())
        {
            if (!tableBFK.getTableB().getTableName().equals(tableA.getTableName()))
                continue;

            List<ColumnInfo> tableBRefCols = tableBFK.getRefColumns();
            Set<ColumnInfo> columns = new HashSet<ColumnInfo>();
            columns.addAll(tableBRefCols);
            columns.removeAll(tableAPKs);
            if (columns.isEmpty())
            {
                ret = "one";
                break;
            }
        }
        return ret;
    }
503688
public String[] getAllColumns() {
        if (cachedAllColumns == null) {
            cachedAllColumns = new ArrayList<String>(getColumnAttributeMappings().keySet())
                    .toArray(ArrayUtils.EMPTY_STRING_ARRAY);
        }
        return cachedAllColumns;
    }
45180
public int getIfdCount() {
    int c = 0;
    if (metadata != null && metadata.contains("IFD"))
      c = getMetadataList("IFD").size();
    return c;
  }
1273084
function() {

		var result = {},
			i = 0;

		for (; i < this._count; i++) {

			result[this._data_uids[i]] = this._data_values[i];

		}

		return result;

	}
1106707
public function delete()
    {
        $sql = 'delete from `' . $this->table . '`';

        if (!is_null($this->where)) {
            $sql .= ' where ' . $this->where;

            $this->where = null;
        }

        $stmt = $this->connection->prepare($sql);

        $this->bind($stmt, $this->where_data_binding);

        $this->where_data_binding = [];

        $stmt->execute();

        $r = $stmt->rowCount();

        return (int) $r;
    }
1164260
public int countAll(){
        checkTable();

        Cursor mCount = null;
        try {
            mCount = database.rawQuery("SELECT COUNT(*) FROM \"" + tableName + "\"", null);
            if (mCount.moveToNext()) {
                return mCount.getInt(1);
            }
        } finally {
            if (mCount != null) {
                mCount.close();
            }
        }
        return 0;
    }
1162500
public int deleteRow() {

        // build the delete string
        String deleteString = "DELETE FROM " + tableName
                              + this.generatePKWhere();
        PreparedStatement ps = null;

        // System.out.println("delete string "+deleteString);
        try {

            // fill the question marks
            ps = cConn.prepareStatement(deleteString);

            ps.clearParameters();

            int i;

            for (int j = 0; j < primaryKeys.length; j++) {
                ps.setObject(j + 1, resultRowPKs[aktRowNr][j]);
            }    // end of for (int i=0; i<primaryKeys.length; i++)

            ps.executeUpdate();
        } catch (SQLException e) {
            ZaurusEditor.printStatus("SQL Exception: " + e.getMessage());

            return 0;
        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException e) {}
        }

        // delete the corresponding primary key values from resultRowPKs
        numberOfResult--;

        for (int i = aktRowNr; i < numberOfResult; i++) {
            for (int j = 0; j < primaryKeys.length; j++) {
                resultRowPKs[i][j] = resultRowPKs[i + 1][j];
            }
        }

        // there are the following outcomes after deleting aktRowNr:
        /*
                                           A B C D E F
        no rows left                   J N N N N N
        one row left                   - J N J N N
        deleted row was the last row   - J J N N N
        deleted row was the pre-last   - - - - J N

            first                          D X + D + *
             .                               D X X D D
             .                                 D   X +
            last                                     X

            new numberOfResult             0 1 2 1 2 2
            old aktRowNr                     0 1 2 0 1 0

        D - deleted row
            X - any one row
            + - one or more rows
        * - zero or more rows

        */

        // A. return to the search panel and tell 'last row deleted' on the status line
        // B. show the previous row and disable previous button
        // C. show the previous row as akt row
        // D. show akt row and disable next button
        // E. show akt row and disable next button
        // F. show akt row
        // these actions reduce to the following actions for ZaurusEditor:
        // 1. show search panel
        // 2. disable previous button
        // 3. disable next button
        // 4. do nothing
        // and 1,2,3,4 are the possible return codes
        int actionCode;

        if (numberOfResult == 0) {

            // case A
            actionCode = 1;

            ZaurusEditor.printStatus("Last row was deleted.");

            return actionCode;
        } else if (numberOfResult == aktRowNr) {

            // B or C
            // new aktRow is previous row
            aktRowNr--;

            if (aktRowNr == 0) {

                // B
                actionCode = 2;
            } else {

                // C
                actionCode = 4;
            }    // end of if (aktRowNr == 0)
        } else {

            // D, E, F
            if (numberOfResult >= 2 && aktRowNr < numberOfResult - 1) {

                // F
                actionCode = 4;
            } else {
                actionCode = 3;
            }    // end of else
        }

        this.showAktRow();
        ZaurusEditor.printStatus("Row was deleted.");

        return actionCode;
    }