public int deleteVector(long id, int countDiff) throws SQLException {

		if (countDiff <= 0) {
			throw new IllegalArgumentException("Invalid countDiff: " + countDiff);
		}

		// TODO: it may be possible to optimize the technique employed here

		PreparedStatement s = update_by_rowid_stmt.prepareIfNeeded(() -> db.prepareStatement(
			"UPDATE " + TABLE_NAME + " SET count = count - ? WHERE id = ? AND count >= ?"));
		s.setInt(1, countDiff);
		s.setLong(2, id);
		s.setInt(3, countDiff); // needed for comparison
		int rc = s.executeUpdate();
		if (rc == 0) {
			return -1;
		}
		if (rc > 1) {
			throw new SQLException("Unexpected updated row count: " + rc);
		}

		int count = queryVectorCountById(id);
		if (count > 0) {
			vectorStore.update(id, count);
			return 0;
		}

		delete(id);
		return 1;
	}
Update vector table entry with the specified countDiff.  Record will be removed
if reduced vector count less-than-or-equal zero. 
@param id vector ID
@param countDiff positive vector count reduction
@return 0 if decrement short of 0, return 1 if record was removed, return
        -1 if there was a problem
@throws SQLException if an error occurs
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/file/H2VectorTable.java