Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
chặn > ConnectionDB > removeConnection
Phương thức ConnectionDB.removeConnection()
Xoá kết nối khỏi cơ sở dữ liệu. Phải tồn tại trong DB.
Chữ ký:
removeConnection(connection: RenderedConnection, yPos: number): void;
Tham số
Thông số |
Loại |
Mô tả |
kết nối |
RenderedConnection |
Kết nối cần xoá. |
yPos |
số |
Vị trí y dùng để tìm chỉ mục của kết nối. |
Trường hợp trả lại hàng:
void
Ngoại lệ
{Lỗi} Nếu không tìm thấy kết nối trong cơ sở dữ liệu.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["The `removeConnection` method is used to remove a specific connection from the ConnectionDB."],["In order to remove a connection, it must already exist in the database."],["To use this method, you must provide the `RenderedConnection` object and its y position (`yPos`) for database lookup."],["If the provided connection is not found in the database, it will throw an error."]]],["The `removeConnection` method within the `ConnectionDB` class removes a specified `RenderedConnection` from the database. It requires the connection to exist and uses a `yPos` number to locate its index. The method takes the connection and its y-position as parameters. Upon successful removal, the method returns void. An error is thrown if the connection cannot be found.\n"]]