FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
FastAPI-JSONAPI/fastapi_jsonapi/common.py at main · srepmub/FastAPI-JSONAPI · GitHub
srepmub
/
FastAPI-JSONAPI
Public
forked from
mts-ai/FastAPI-JSONAPI
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
FastAPI-JSONAPI
/
fastapi_jsonapi
/
common.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (13 loc) · 775 Bytes
Breadcrumbs
FastAPI-JSONAPI
/
fastapi_jsonapi
/
common.py
Copy path
File metadata and controls
18 lines (13 loc) · 775 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from
typing
import
Optional
# noinspection PyProtectedMember
from
pydantic
.
fields
import
FieldInfo
from
fastapi_jsonapi
.
types_metadata
import
ClientCanSetId
,
CustomFilterSQL
,
CustomSortSQL
,
RelationshipInfo
from
fastapi_jsonapi
.
utils
.
metadata_instance_search
import
MetadataInstanceSearch
search_client_can_set_id
=
MetadataInstanceSearch
[
ClientCanSetId
](
ClientCanSetId
)
search_relationship_info
=
MetadataInstanceSearch
[
RelationshipInfo
](
RelationshipInfo
)
search_custom_filter_sql
=
MetadataInstanceSearch
[
CustomFilterSQL
](
CustomFilterSQL
)
search_custom_sort_sql
=
MetadataInstanceSearch
[
CustomSortSQL
](
CustomSortSQL
)
def
get_relationship_info_from_field_metadata
(
field
:
FieldInfo
,
)
->
Optional
[
RelationshipInfo
]:
return
search_relationship_info
.
first
(
field
)
Back
|
FazBrowse Home
|
New Git URL