mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 05:15:58 +00:00
feat: findOne (#1830)
* feat: add fineOne api Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com> * feat: add findOne logic Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com> * docs: add findOne & fix typos for dbViewRow Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com> * fix: point to local nocodb-sdk for the tests Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com> * feat: findone impl Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
This commit is contained in:
@@ -573,6 +573,16 @@
|
||||
},
|
||||
"tags": [
|
||||
"Project"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"minimum": 1,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -2521,6 +2531,75 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/find-one": {
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "orgs",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "projectName",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "tableName",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "Table row FindOne",
|
||||
"operationId": "db-table-row-find-one",
|
||||
"description": "",
|
||||
"tags": [
|
||||
"DB table row"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "array"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "fields"
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "array"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "sort"
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "where"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/count": {
|
||||
"parameters": [
|
||||
{
|
||||
@@ -2689,6 +2768,89 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/find-one": {
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "orgs",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "projectName",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "tableName",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "viewName",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "Table view row FindOne",
|
||||
"operationId": "db-view-row-find-one",
|
||||
"description": "",
|
||||
"tags": [
|
||||
"DB view row"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "array"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "fields"
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "array"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "sort"
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "where"
|
||||
},
|
||||
{
|
||||
"schema": {},
|
||||
"in": "query",
|
||||
"name": "nested",
|
||||
"description": "Query params for nested data"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/count": {
|
||||
"parameters": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user