Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,19 @@ pip install sqlalchemy-json-querybuilder

# SQLAlchemy `queryset` can also be obtanied, all the functions supported by SQLAlchemy on queryset can be invoked on the underlying queryset and later records can be fetched -

queryset = search_obj.query
queryset = search_obj.query()
queryset = queryset.join(Address, User.id==Address.user_id).join(UserProfile)
# Fetching records
results = queryset.all()

# if you want to group by:
queryset = search_test.query()
queryset = queryset.with_entities(Table.column1, func.count(Table.column2)).group_by(Table.column1)
# Fetching records
results = queryset.all()



```


Expand Down