Update collection.md

This commit is contained in:
Pearl C 2023-02-05 12:33:01 +08:00 committed by GitHub
parent e5973a76cc
commit a37a2e75fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ const posts = new Collection({
});
```
## Instance Member
## Instance Members
### `options`
@ -108,7 +108,7 @@ Match the Model type of Sequelize.
Data repository instance.
## Field Configuration Method
## Field Configuration Methods
### `getField()`
@ -333,7 +333,7 @@ const posts = db.collection({
posts.forEachField(field => console.log(field.name));
```
## Index Configuration Method
## Index Configuration Methods
### `addIndex()`
@ -405,7 +405,7 @@ const posts = db.collection({
posts.removeIndex(['title']);
```
## Table Configuration Method
## Table Configuration Methods
### `remove()`
@ -431,7 +431,7 @@ const posts = db.collection({
posts.remove();
```
## Database Operation Method
## Database Operation Methods
### `sync()`