& جاري

C

storage.run({ action: "dropCollection", collection })

يزيل a و الكل بوصة الإيطالية يُخبرُك كم عدد الوثائق.

document databasefreenot reversible
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

await storage.run({ action: "dropCollection", collection: "temp_import" });
// { ok: true, dropped: "temp_import", documents: 48211 }
storage.run(action="dropCollection", collection="temp_import")
# {"ok": True, "dropped": "temp_import", "documents": 48211}
كم عدد الوثائق التي دمرتها

فَقَدْ تَعَدُّ إِلَى ٱلْحَقِّ ، لَا يَنْبَغِي أَنْ يَتَعَلَّمَ ٱلْكِتَابُ ٱلْمُقَدَّسُ مِنْ مَسْؤُولِيَّةِ ٱلْمَسِيحِيِّينَ .

const { count } = await storage.run({ action: "count", collection });
if (count > 0) throw new Error(`${collection} still holds ${count} documents`);

await storage.run({ action: "dropCollection", collection });
count = storage.run(action="count", collection=collection)["count"]
if count > 0:
    raise RuntimeError(f"{collection} still holds {count} documents")

storage.run(action="dropCollection", collection=collection)

جمع لا يوجد ما يُرفض

فبدلا من الاجابة عن السؤال « فعل » ، من اجل شيء لم يكن موجودا قط ، الذي يخفي خطأ مطبعي في اسم ، في الوقت المحدد ، يكون اهمية المطبعة في هذا الوقت .

const existing = await storage.run({ action: "collections" });
if (!existing.some((c) => c.name === collection)) {
  // Nothing to drop. A misspelling here would otherwise look like success.
}
existing = storage.run(action="collections")
if not any(c["name"] == collection for c in existing):
    pass  # Nothing to drop. A misspelling here would otherwise look like success.

يعمل حتى عندما يكون التخزين ممتلئاً

مثل تحذف عبارة،الإسقاط مسموح به بعد الحصة: هو كيف يمكنك جعل الغرفة، وبالتالي رفضه يترك مخزن لا يمكن تفريغه.

ما قد يفعله العميل به

الـ أكثر فتحاً هو الوحيد الذي يسمح بهذا عبر غير قاب

في طريقة التخطيط يرفضه تماماً، وفي أي مكان آخر يطلبه، وإذا لم يكن على عميلك أن يسقط شيئاً، فقل ذلك في تعليماته، واجيب على السرعة - فالأسلوب وحده أداة غير حادة.