Browse Source

docs: table-details

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/6467/head
Raju Udava 1 year ago
parent
commit
2c276c4378
  1. 5
      packages/noco-docs/docs/065.table-details/_category_.json
  2. 267
      packages/noco-docs/docs/065.table-details/table-details-overview.md
  3. 29
      packages/noco-docs/docs/080.records/070.actions-on-record.md
  4. BIN
      packages/noco-docs/static/img/v2-unannotated/records/bulk-update-1.png
  5. BIN
      packages/noco-docs/static/img/v2-unannotated/records/bulk-update-2.png
  6. BIN
      packages/noco-docs/static/img/v2-unannotated/records/bulk-update-3.png
  7. BIN
      packages/noco-docs/static/img/v2-unannotated/table-details/details-api-snippet.png
  8. BIN
      packages/noco-docs/static/img/v2-unannotated/table-details/details-field-editor.png
  9. BIN
      packages/noco-docs/static/img/v2-unannotated/table-details/details-relations.png
  10. BIN
      packages/noco-docs/static/img/v2-unannotated/table-details/details-webhook.png
  11. BIN
      packages/noco-docs/static/img/v2/records/bulk-update-1.png
  12. BIN
      packages/noco-docs/static/img/v2/records/bulk-update-2.png
  13. BIN
      packages/noco-docs/static/img/v2/records/bulk-update-3.png
  14. BIN
      packages/noco-docs/static/img/v2/table-details/details-api-snippet.png
  15. BIN
      packages/noco-docs/static/img/v2/table-details/details-field-editor.png
  16. BIN
      packages/noco-docs/static/img/v2/table-details/details-relations.png
  17. BIN
      packages/noco-docs/static/img/v2/table-details/details-webhook.png

5
packages/noco-docs/docs/065.table-details/_category_.json

@ -0,0 +1,5 @@
{
"label": "Table Details",
"collapsible": true,
"collapsed": true
}

267
packages/noco-docs/docs/065.table-details/table-details-overview.md

@ -0,0 +1,267 @@
---
title: 'Table details overview'
description: 'Table details overview'
tags: ['Table details', 'Table', 'Overview']
keywords: ['table details', 'table overview', 'table']
---
`Table Details` section houses various tools & utilities to manage & work with your table schema & data. This essentially is a place for 'Creators' to build & manage their tables quickly. `Details` section is accessible using the `Data-Details` toggle switcher in the top navbar.
This section is divided into 4 parts:
## Fields
Fields is a multi-field table schema editor that allows you to add, edit, delete and reorder fields quickly & easily from one place. Additional details about multi-field editor can be found [here](/fields/fields-editor)
![image](/img/v2/table-details/details-field-editor.png)
## Relations
[//]: # (Table will have relations with other tables. As the schema gets bigger, it becomes difficult to keep track of all the relations. This section provides a quick overview of all the relations that a table has using a visual graph as `Entity Relationship Diagram`. )
Relations are vital for managing data connections in a database. In a complex schema, it's essential to have a clear understanding of these connections because they:
1. Maintain data accuracy.
2. Enhance query efficiency.
3. Aid in logical schema design.
4. Support data analysis.
5. Enable proper application development.
Visualizing these relations through an Entity Relationship Diagram (ERD) simplifies their comprehension and management, especially as the database grows in complexity.
![image](/img/v2/table-details/details-relations.png)
:::note
You can drag drop the tables to rearrange them in the diagram. Note that, such reordering will not persist across sessions.
:::
## API Snippet
NocoDB provides programmatic access to your data via REST APIs. API snippets in NocoDB offer ready-made code examples in various programming languages, simplifying the process of integrating your data with external applications. These snippets save time and effort by providing a quick and easy reference for developers, enabling them to interact with your NocoDB database programmatically without the need to write code from scratch.
A quick snippet for different scripts & languages is listed in this section.
![image](/img/v2/table-details/details-api-snippet.png)
### Sample snippets
<Tabs>
<TabItem value="Shell" label="Shell">
```bash
curl --request GET \
--url 'http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer?offset=0&limit=25&where=' \
--header 'xc-auth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU'
```
</TabItem>
<TabItem value="Javascript" label="Javascript">
```bash
import axios from "axios";
const options = {
method: 'GET',
url: 'http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer',
params: {offset: '0', limit: '25', where: ''},
headers: {
'xc-auth': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
```
</TabItem>
<TabItem value="Node" label="Node">
```bash
var axios = require("axios").default;
var options = {
method: 'GET',
url: 'http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer',
params: {offset: '0', limit: '25', where: ''},
headers: {
'xc-auth': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
```
</TabItem>
<TabItem value="NocoDB SDK" label="NocoDB SDK">
```bash
import { Api } from "nocodb-sdk";
const api = new Api({
baseURL: "http://localhost:8080",
headers: {
"xc-auth": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU"
}
})
api.dbViewRow.list(
"noco",
"ExternalDB",
"Customer",
"Customer", {
"offset": 0,
"limit": 25,
"where": ""
}).then(function (data) {
console.log(data);
}).catch(function (error) {
console.error(error);
});
```
</TabItem>
<TabItem value="PHP" label="PHP">
```bash
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer?offset=0&limit=25&where=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"xc-auth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
```
</TabItem>
<TabItem value="Python" label="Python">
```bash
import http.client
conn = http.client.HTTPConnection("localhost:8080")
headers = { 'xc-auth': "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU" }
conn.request("GET", "/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer?offset=0&limit=25&where=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```
</TabItem>
<TabItem value="Ruby" label="Ruby">
```bash
require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer?offset=0&limit=25&where=")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["xc-auth"] = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU'
response = http.request(request)
puts response.read_body
```
</TabItem>
<TabItem value="Java" label="Java">
```bash
HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer?offset=0&limit=25&where=")
.header("xc-auth", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU")
.asString();
```
</TabItem>
<TabItem value="C" label="C">
```bash
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "http://localhost:8080/api/v1/db/data/noco/p18h72lcfwzpsvu/Customer/views/Customer?offset=0&limit=25&where=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "xc-auth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
```
</TabItem>
</Tabs>
## Supported Snippet
### Shell
- cURL
- wget
### Javascript
- Axios
- Fetch
- jQuery
- XHR
### Node
- Axios
- Fetch
- Request
- Native
- Unirest
### NocoDB SDK
- Javascript
- Node
### PHP
### Python
- http.client
- request
### Ruby
### Java
### C
## Webhook
Webhooks are essential for real-time communication and automation between NocoDB and external systems. They serve several crucial purposes:
1. **Instant Notifications:** Webhooks enable immediate notifications when there are changes in your NocoDB database. This real-time information can be crucial for timely responses to important events, such as new data entries, updates, or deletions.
2. **Automation:** They facilitate the automation of processes by triggering actions in external systems based on database events. For example, you can automate tasks like sending emails, updating spreadsheets, or syncing data with other applications in response to changes in NocoDB.
3. **Integration:** Webhooks allow you to seamlessly integrate NocoDB with other tools and services, enhancing the overall functionality of your database. This integration can streamline workflows, improve data consistency, and reduce manual data entry.
4. **Bulk Operations:** NocoDB's support for webhooks in bulk endpoints makes it efficient to handle multiple records simultaneously. This is especially useful when dealing with large datasets or when you need to perform batch operations in external systems.
In summary, webhooks in NocoDB empower you to create dynamic, responsive, and interconnected workflows by keeping external systems in sync with your database's activities.
![image](/img/v2/table-details/details-webhook.png)
Note that, Webhooks currently are specific for associated table. Additional procedural details about webhooks can be found [here](/automation/webhook/webhook-overview)

29
packages/noco-docs/docs/080.records/070.actions-on-record.md

@ -34,7 +34,8 @@ Edit state for some cells will be a picker. For example, a cell with `Single Sel
| `Tab` | Move to next cell horizontally; if on last cell, move to beginning of next record |
### Record Edit
### Update Record
You can start editing by any of the following methods
- Double-click on cell to edit
- Click on cell and start typing (this way it will clear the previous content)
@ -42,6 +43,32 @@ You can start editing by any of the following methods
And it will automatically save on blur event or if inactive.
### Bulk Update Records
You can bulk update records by
1. Selecting multiple records that you wish to update together and then
2. Right-click on the index field area (first column on the grid view) and then select `Bulk Update records` option from the context menu. This will open `Bulk update` modal.
On the bulk update modal,
3. `Fields area` : Select the fields that you want to update.
4. `Selected fields area` : Enter the new value for the selected fields.
5. Click on the `Bulk Update all` button
6. A confirmation dialog will be displayed. Click on `Confirm` to update the records.
:::danger
This operation cannot be undone.
:::
![Bulk Update](/img/v2/records/bulk-update-1.png)
![Bulk Update](/img/v2/records/bulk-update-2.png)
![Bulk Update](/img/v2/records/bulk-update-3.png)
:::info
You can drag drop required fields from the `Fields area` to the `Selected fields area` & vice versa.
You can update multiple fields at a time.
:::
### Delete Record (Single)
Right-click on record and then from the cell context menu, select `Delete Row` option.

BIN
packages/noco-docs/static/img/v2-unannotated/records/bulk-update-1.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

BIN
packages/noco-docs/static/img/v2-unannotated/records/bulk-update-2.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

BIN
packages/noco-docs/static/img/v2-unannotated/records/bulk-update-3.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

BIN
packages/noco-docs/static/img/v2-unannotated/table-details/details-api-snippet.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

BIN
packages/noco-docs/static/img/v2-unannotated/table-details/details-field-editor.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

BIN
packages/noco-docs/static/img/v2-unannotated/table-details/details-relations.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

BIN
packages/noco-docs/static/img/v2-unannotated/table-details/details-webhook.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

BIN
packages/noco-docs/static/img/v2/records/bulk-update-1.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
packages/noco-docs/static/img/v2/records/bulk-update-2.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

BIN
packages/noco-docs/static/img/v2/records/bulk-update-3.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

BIN
packages/noco-docs/static/img/v2/table-details/details-api-snippet.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

BIN
packages/noco-docs/static/img/v2/table-details/details-field-editor.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

BIN
packages/noco-docs/static/img/v2/table-details/details-relations.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

BIN
packages/noco-docs/static/img/v2/table-details/details-webhook.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Loading…
Cancel
Save