pixano.app.routers.views
create_view(dataset_id, table, id, view, settings)
async
Add an view in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the view. |
required |
view
|
ViewModel
|
View to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
ViewModel
|
The view added. |
Source code in pixano/app/routers/views.py
create_views(dataset_id, table, views, settings)
async
Add views in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
views
|
list[ViewModel]
|
Views to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[ViewModel]
|
List of views added. |
Source code in pixano/app/routers/views.py
delete_view(dataset_id, table, id, settings)
async
Delete an view from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the view to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/views.py
delete_views(dataset_id, table, ids, settings)
async
Delete views from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
ids
|
Annotated[list[str], Query()]
|
IDs of the views to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/views.py
get_view(dataset_id, table, id, settings)
async
Get an view from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the view. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
ViewModel
|
The view. |
Source code in pixano/app/routers/views.py
get_views(dataset_id, table, settings, ids=Query(None), limit=None, skip=0, where=None, item_ids=Query(None))
async
Get views from a table of a dataset.
They can be filtered by IDs, item IDs, a where clause or paginated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
ids
|
list[str] | None
|
IDs of the views. |
Query(None)
|
limit
|
int | None
|
Limit number of views. |
None
|
skip
|
int
|
Skip number of views. |
0
|
where
|
str | None
|
Where clause. |
None
|
item_ids
|
list[str] | None
|
Item IDs. |
Query(None)
|
Returns:
Type | Description |
---|---|
list[ViewModel]
|
List of views. |
Source code in pixano/app/routers/views.py
update_view(dataset_id, table, id, view, settings)
async
Update an view in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the view. |
required |
view
|
ViewModel
|
View to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
ViewModel
|
The view updated. |
Source code in pixano/app/routers/views.py
update_views(dataset_id, table, views, settings)
async
Update views in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
views
|
list[ViewModel]
|
Views to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[ViewModel]
|
List of views updated. |