Delete an existing BO from storage.

@param conn
@param bo
@return
@since 0.8.1
14447
protected DaoResult delete(Connection conn, T bo) {
        if (bo == null) {
            return new DaoResult(DaoOperationStatus.NOT_FOUND);
        }
        int numRows = execute(conn, calcSqlDeleteOne(bo),
                rowMapper.valuesForColumns(bo, rowMapper.getPrimaryKeyColumns()));
        DaoResult result = numRows > 0 ? new DaoResult(DaoOperationStatus.SUCCESSFUL, bo)
                : new DaoResult(DaoOperationStatus.NOT_FOUND);
        if (numRows > 0) {
            invalidateCache(bo, CacheInvalidationReason.DELETE);
        }
        return result;
    }
949146
public byte[] deleteBytes(byte[] content) throws IOException {

        if (!connection.isOpen())
            connection.open();

        connection.prepare("DELETE");

        OutputStream os = null;
        if (content != null) {
            connection.getConnection().setDoOutput(true);
            os = connection.getOutputStream();
            os.write(content);
        }

        response = connection.readInput();
        if (os != null)
           os.close();
        return getResponseBytes();
    }
564415
public static Object convertBlob(Connection conn, byte[] value) throws SQLException {
        Object result = createBlob(conn);

        result = convertBlob(result, value);

        return result;
    }
460717
def delete(self, bulk=False):
        
        meta = self._meta
        conn = meta['connection']
        conn.delete(meta.index, meta.type, meta.id, bulk=bulk)
1040472
public function remove($col, $cond = [], $cb = null, $params = [])
    {
        if (mb_orig_strpos($col, '.') === false) {
            $col = $this->dbname . '.' . $col;
        }

        if (is_string($cond)) {
            $cond = new \MongoCode($cond);
        }

        if ($this->safeMode && is_array($cond)) {
            static::safeModeEnc($cond);
        }
        try {
            $this->request(
                self::OP_DELETE,
                "\x00\x00\x00\x00" . $col . "\x00" . "\x00\x00\x00\x00" . bson_encode($cond),
                false,
                null,
                function ($conn, $reqId = null) use ($col, $cb, $params) {
                    if (!$conn) {
                        !$cb || $cb(['$err' => 'Connection error.']);
                        return;
                    }
                    if ($cb !== null) {
                        $this->lastError($col, $cb, $params, $conn);
                    }
                }
            );
        } catch (\MongoException $e) {
            Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString());
            if ($cb !== null) {
                $cb(['$err' => $e->getMessage(), '$query' => $cond]);
            }
        }
    }
438391
def __delete_internal_blob(self, key):
        ''' 
        '''
        with self.get_conn() as conn:
            conn.isolation_level = None
            try:
                c = conn.cursor()
                c.execute("BEGIN")
                if key is None:
                    c.execute("DELETE FROM cache_entries WHERE key IS NULL")
                    c.execute("DELETE FROM blob_entries WHERE KEY IS NULL")
                else:
                    c.execute("DELETE FROM cache_entries WHERE key = ?", (key,))
                    c.execute("DELETE FROM blob_entries WHERE KEY = ?", (key,))
                c.execute("COMMIT")
            except:
                getLogger().debug("Cannot delete")
                return False
            return True
178419
public static <T, ID> int deleteObjects(Dao<T, ID> dao, TableInfo<T, ID> tableInfo,
			DatabaseConnection databaseConnection, Collection<T> datas, ObjectCache objectCache) throws SQLException {
		MappedDeleteCollection<T, ID> deleteCollection = MappedDeleteCollection.build(dao, tableInfo, datas.size());
		Object[] fieldObjects = new Object[datas.size()];
		FieldType idField = tableInfo.getIdField();
		int objC = 0;
		for (T data : datas) {
			fieldObjects[objC] = idField.extractJavaFieldToSqlArgValue(data);
			objC++;
		}
		return updateRows(databaseConnection, tableInfo.getDataClass(), deleteCollection, fieldObjects, objectCache);
	}
1373723
public static void closeConnection(Connection conn){
		if (conn != null) {
			try {
				conn.close();
			} catch (Exception e) {
				log.warn("Exception when closing database connection.", e);
			}
		}
	}
254005
static void closeLink(CommsConnection conn) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "closeLink", conn);

    conn.setSchemaSet(null);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "closeLink");
  }
1326379
public static void deleteAllMeta(DbConn cnx, boolean force)
    {
        if (force)
        {
            deleteAllTransac(cnx);
        }

        cnx.runUpdate("globalprm_delete_all");
        cnx.runUpdate("dp_delete_all");
        cnx.runUpdate("sjprm_delete_all");
        cnx.runUpdate("sj_delete_all");
        cnx.runUpdate("jdprm_delete_all");
        cnx.runUpdate("node_delete_all");
        cnx.runUpdate("jd_delete_all");
        cnx.runUpdate("q_delete_all");
        cnx.runUpdate("jndiprm_delete_all");
        cnx.runUpdate("jndi_delete_all");
        cnx.runUpdate("pki_delete_all"); // No corresponding DTO.
        cnx.runUpdate("perm_delete_all");
        cnx.runUpdate("role_delete_all");
        cnx.runUpdate("user_delete_all");
    }
895640
protected DaoResult create(Connection conn, T bo) {
        if (bo == null) {
            return null;
        }
        Savepoint savepoint = null;
        try {
            try {
                savepoint = conn.getAutoCommit() ? null : conn.setSavepoint();
                int numRows = execute(conn, calcSqlInsert(bo),
                        rowMapper.valuesForColumns(bo, rowMapper.getInsertColumns()));
                DaoResult result = numRows > 0 ? new DaoResult(DaoOperationStatus.SUCCESSFUL, bo)
                        : new DaoResult(DaoOperationStatus.ERROR);
                if (numRows > 0) {
                    invalidateCache(bo, CacheInvalidationReason.CREATE);
                }
                return result;
            } catch (DuplicatedValueException dke) {
                if (savepoint != null) {
                    conn.rollback(savepoint);
                }
                return new DaoResult(DaoOperationStatus.DUPLICATED_VALUE);
            }
        } catch (SQLException e) {
            throw new DaoException(e);
        }
    }
552035
protected void releaseConnection(Object conn)
    {
        clientFactory.releaseConnection(((Connection) conn).getPool(), ((Connection) conn).getClient());
    }
1004466
def delete_connection(self, **kwargs):
        """"""
        conn = self.find_connection(**kwargs)
        if not conn:
            return False
        self.delete(conn)
        return True
272205
private void closeConnection( IConnection conn )
    {
        try
        {
            if( conn != null && conn.isOpen() )
                conn.close();
        }
        catch ( OdaException e )
        {
            // ignore
            e.printStackTrace();
        }
    }
440135
private static void removeAll(Connection conn, ArrayList<String> usedTables) {
	int len = usedTables.size();

	for (int i = 0; i < len; i++) {

	    String tableName = usedTables.get(i).toString();
	    // print.out("remove:"+tableName);
	    try {
		removeTable(conn, tableName);
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	}
    }
263189
function doDelete(PDO $conn = null) {
		$q = clone $this;

		if (!$q->getTable()) {
			throw new RuntimeException('No table specified.');
		}

		$q->setAction(self::ACTION_DELETE);
		return (int) $q->getQuery($conn)->bindAndExecute()->rowCount();
	}
21047
public T remove(long seqno) {
        lock.lock();
        try {
            if(seqno < low || seqno > high)
                return null;
            int index=index(seqno);
            T retval=buffer[index];
            if(retval != null && removes_till_compaction > 0)
                num_removes++;
            buffer[index]=null;
            if(seqno == low)
                advanceLow();
            if(removes_till_compaction > 0 && num_removes >= removes_till_compaction) {
                _compact();
                num_removes=0;
            }
            return retval;
        }
        finally {
            lock.unlock();
        }
    }