This repository has been archived by the owner on Jul 28, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Sending Requests: Drop Database & Collection Requests.
Mihou edited this page Jun 22, 2021
·
1 revision
There are two ways for DROP requests, one is for dropping collections and the other for dropping database.
- To drop a database, you can leave out
collection
from the request. - To drop a collection, you have to have both
collection
anddatabase
on the request.
The method
field for this request must be drop
.
You can use the Queria format:
database.collection.drop()
Or if you like, feel free to use the JSON
format which has fields as written below:
FIELD | TYPE | DESCRIPTION |
---|---|---|
method | string | The type of request to send. |
database | string | The database where the collection is located. |
collection | string | The collection to drop. |
unique | string | The unique value to return (used for getting back exact responses from the server). |
FIELD | TYPE | DESCRIPTION |
---|---|---|
response | string | Replies back with something among the likes of: "Successfully deleted the collection {{collection}}" |
kode | integer | The server reply code (1 for success, 0 for no results, -1 for invalid request). |
replyTo | string | The unique code sent back (for callbacks). |
{
"response": "Successfully deleted the collection Mana",
"kode": 1,
"replyTo": "Unique Identifier from Request"
}
You can use the Queria format:
database.drop()
Or if you like, feel free to use the JSON
format which has fields as written below:
FIELD | TYPE | DESCRIPTION |
---|---|---|
method | string | The type of request to send. |
database | string | The database to drop. |
unique | string | The unique value to return (used for getting back exact responses from the server). |
FIELD | TYPE | DESCRIPTION |
---|---|---|
response | string | Replies back with something among the likes of: "Successfully deleted the database {{database}}" |
kode | integer | The server reply code (1 for success, 0 for no results, -1 for invalid request). |
replyTo | string | The unique code sent back (for callbacks). |
{
"response": "Successfully deleted the database rose_db",
"kode": 1,
"replyTo": "Unique Identifier from Request"
}