هذه أغنى من موفري الخدمات المترابطين، والواحدة التي كانت أدوات الوكيل تتشكل حولها: قاعدة بيانات لم يرها من قبل يمكن رسمها، واستجوابها وكتابتها بدون إعلان مخطط في أي مكان.
هذا
const db = await api.storage.connect({
label: "Production",
type: "database",
provider: "mongodb",
endpoint: { credentials: { uri: "mongodb+srv://user:password@cluster.example.net/shop" } },
});db = api.storage.connect(
label="Production",
type="database",
provider="mongodb",
endpoint={"credentials": {"uri": "mongodb+srv://user:password@cluster.example.net/shop"}},
)credentials.uristringمطلوبسلسلة الاتصال. إنها تحمل كلمة المرور، لذا تنتمي إلى credentialsالتي تشفر في الراحة
…/shop هو ما يختار قاعدة البيانات. URI وهذا هو التفسير المعتاد لـ : « مجموعتي مفقودة » .
ما الذي يُقبل منه هذا
| الإجراء | قراءات أو كتابات | الاحتياجات إلى جمع البيانات |
|---|---|---|
| لمحة | (ب) تشمل تكاليف السفر في مهام رسمية. | لا: |
| (الجمعات) | (ب) تشمل تكاليف السفر في مهام رسمية. | لا: |
| الفترة | (ب) تشمل تكاليف السفر في مهام رسمية. | نعم |
| جد جد | (ب) تشمل تكاليف السفر في مهام رسمية. | نعم |
| عدد | (ب) تشمل تكاليف السفر في مهام رسمية. | نعم |
| المجموع | (ب) تشمل تكاليف السفر في مهام رسمية. | نعم |
| & لا شيء | (ب) تشمل تكاليف السفر في مهام رسمية. | لا: |
| ما يلي: | كتابة كتابة | نعم |
| المستكمل | كتابة كتابة | نعم |
| تحذف عبارة | كتابة كتابة | نعم |
| هذا | كتابة كتابة | نعم |
| هذا | كتابة كتابة | نعم |
| C | كتابة كتابة | نعم |
Anything else raises Action MongoDB inconnue. tables, execute, list, object and upload belong to other providers.
_id may be a string
An identifier written as a 24-character string is turned into an ObjectId wherever one is expected: direct equality, $in, $nin and $ne. That is what lets an identifier travel through JSON — out of a find, into a form, back into an update — without a cast of yours in between.
const [order] = await db.run({ action: "find", collection: "orders", options: { limit: 1 } });
// order._id arrived as a string; it goes back as one
await db.run({
action: "update",
collection: "orders",
filter: { _id: order._id },
update: { $set: { status: "shipped" } },
});order = db.run(action="find", collection="orders", options={"limit": 1})[0]
# order["_id"] arrived as a string; it goes back as one
db.run(
action="update",
collection="orders",
filter={"_id": order["_id"]},
update={"$set": {"status": "shipped"}},
)رفض رفض 5 من المشغلين خمسة
$where, $function and $accumulator run JavaScript inside the database; $out and $merge write somewhere other than where you are looking. All five are refused on find, count, update, delete and aggregate, by inspecting the filter or the pipeline you sent.
await db.run({ action: "find", collection: "users", filter: { $where: "this.age > 30" } });
// Error: find : l'operateur $where n'est pas autorise.db.run(action="find", collection="users", filter={"$where": "this.age > 30"})
# IaGenifyError: find : l'operateur $where n'est pas autorise.الحدود التي فرضت على
| شيء | الحد |
|---|---|
aggregate ( | الوثائق |
aggregate and count duration | 30 ثانية |
insert ألف من الفئة | ١ الى ٥٠٠ ١ وثيقة |
overview | 30 جمعا، و 25 حقل، و عينة واحدة لكل من |
schema | وثائق مجلس الأمن المنشأة مؤخرا |
يجري إجراء
تحديث وحذف بدون مرشح سيمس كل مستند، لذا يتوقفون إلا إذا أضفتم كل: صحيح. القراء ليس لديهم مثل هذا الحارس - مرشح فارغ عند العثور هو سؤال عادي.
تم حفظ الصلة
واحد لكل عميل URI يتم حجزها وإعادة استخدامها عبر المكالمات، لذلك فإن الثاني run() لا إعادة اتصال. A URI ( ١ تيموثاوس ٣ : ١ ) فَهَلْ تَتَغَيَّرُ ٱلْمَسِيحِيُّونَ ؟
تم ترشيح النظام خارج
collections and overview leave out anything in the system. namespace. What you see is what you put there.