fastapi-pagination icon indicating copy to clipboard operation
fastapi-pagination copied to clipboard

Using SQLAlchemy

Open limzyishere opened this issue 1 year ago • 1 comments

Hello! Simple question if you wouldn't mind answering. I was reading the documentation and it states.

For instance, if you use SQLAlchemy you can use paginate from fastapi_pagination.ext.sqlalchemy module. What are the consequences of using paginate from fastapi_pagination instead? It will load all the data in memory before paginating it? is my understanding correct?

Thank you!

limzyishere avatar May 18 '24 17:05 limzyishere

Every paginate function requires some configuration to work with related ORM/ODM. The paginate function from fastapi_pagination is not meant to be used with SQLAlchemy.

hasansezertasan avatar May 18 '24 17:05 hasansezertasan

@limzyishere Sorry for long response. Do you still have a question or @hasansezertasan answered it?

uriyyo avatar Jun 06 '24 14:06 uriyyo

@limzyishere I'm closing this issue. Please, reopen it in case you still have questions.

uriyyo avatar Jul 02 '24 15:07 uriyyo