firebase-firestore
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCloud Firestore Database and Operations
Cloud Firestore数据库与操作
Before setting up dependencies, writing data models, or configuring security
rules, you MUST always identify the Firestore instance edition.
在设置依赖项、编写数据模型或配置安全规则之前,您必须先确定Firestore实例的版本。
1. Instance Selection and Edition Detection
1. 实例选择与版本检测
Run the following command to list current Firestore databases:
bash npx -y firebase-tools@latest firestore:databases:list运行以下命令列出当前的Firestore数据库:
bash npx -y firebase-tools@latest firestore:databases:listA. Instance Found
A. 检测到实例
- For each database found, inspect its edition and details:
bash npx -y firebase-tools@latest firestore:databases:get <database-id> - Ask the user which database instance they wish to target or if they would prefer to create a new instance.
- Once the target instance is established:
- If the is
edition, follow the guides underSTANDARD.references/standard/ - If the is
editionor native mode, follow the guides underENTERPRISE.references/enterprise/
- If the
- 对于每个检测到的数据库,查看其版本和详细信息:
bash npx -y firebase-tools@latest firestore:databases:get <database-id> - 询问用户希望针对哪个数据库实例操作,或者是否需要创建新实例。
- 确定目标实例后:
- 如果****为
edition,请遵循STANDARD下的指南。references/standard/ - 如果****为
edition或原生模式,请遵循ENTERPRISE下的指南。references/enterprise/
- 如果**
B. No Instance Found (or New Requested)
B. 未检测到实例(或用户要求创建新实例)
If no databases exist or the user requests a new one, default to provisioning an
Enterprise edition database: - Proceed with using the guides under
.
bash npx -y firebase-tools@latest firestore:databases:create <database-id> --edition="enterprise" --location="nam5"references/enterprise/如果不存在任何数据库,或用户要求创建新实例,则默认创建Enterprise版本的数据库: - 后续请遵循下的指南。
bash npx -y firebase-tools@latest firestore:databases:create <database-id> --edition="enterprise" --location="nam5"references/enterprise/2. Specialized Guides
2. 专项指南
Based on the identified or created instance edition, open and read the
corresponding reference guides:
根据识别或创建的实例版本,打开并阅读对应的参考指南:
Standard Edition (references/standard/
)
references/standard/Standard Edition(references/standard/
)
references/standard/- Provisioning: Read provisioning.md
- Security Rules: Read security_rules.md
- SDK Usage: Read web_sdk_usage.md
- Indexes: Read indexes.md
- 资源配置:阅读 provisioning.md
- 安全规则:阅读 security_rules.md
- SDK使用:阅读web_sdk_usage.md
- 索引:阅读indexes.md
Enterprise Edition / Native Mode (references/enterprise/
)
references/enterprise/Enterprise Edition / 原生模式(references/enterprise/
)
references/enterprise/- Provisioning: Read provisioning.md
- Data Model: Read data_model.md
- Security Rules: Read security_rules.md
- SDK Usage: Read web_sdk_usage.md or python_sdk_usage.md
- Indexes: Read indexes.md
- 资源配置:阅读 provisioning.md
- 数据模型:阅读data_model.md
- 安全规则:阅读 security_rules.md
- SDK使用:阅读 web_sdk_usage.md 或 python_sdk_usage.md
- 索引:阅读indexes.md