[sqlalchemy] sqlalchemy.engine question

14 views
Skip to first unread message

Tucker McCoy

unread,
Jul 25, 2019, 11:01:59 AM7/25/19
to sqlal...@googlegroups.com
Hello everyone,

I have been puzzled with this question for a while and I found this group who hopefully answer my question. I am currently developing a REST API application using sqlalcemy/flask and everything is working as expected. The only thing that I can't figure out for the life of me is when the query is ran it only returns back the top 30 like shown in the picture attached. There are way more resources than 30 in my database. Can anyone please help me with figuring out where this top 30 is coming from and if there is a way to change it or something so I can have all results returned?

Thank you very much for your time and help, I hope to hear from someone soon!

Tucker McCoy

Screen Shot 2019-07-25 at 10.57.16 AM.png

Jonathan Vanasco

unread,
Jul 25, 2019, 11:17:39 AM7/25/19
to sqlalchemy
what does your sqlalchemy query code look like?

Tucker McCoy

unread,
Jul 25, 2019, 1:55:10 PM7/25/19
to sqlal...@googlegroups.com
Thank you for getting back to me, Jonathan. I have attached the file with my model on it.

On Thu, Jul 25, 2019 at 11:17 AM Jonathan Vanasco <jona...@findmeon.com> wrote:
what does your sqlalchemy query code look like?

--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
 
http://www.sqlalchemy.org/
 
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/24c7d2e4-72e5-4257-b12d-4573e0833f5a%40googlegroups.com.
Screen Shot 2019-07-25 at 1.53.40 PM.png

Jonathan Vanasco

unread,
Jul 25, 2019, 4:13:56 PM7/25/19
to sqlalchemy
Are you writing any code that queries this model or are you just letting the framework handle that?  We'd need to see the actual code you are using to query the database.

If you are not writing code that looks like 'session.query(model.AccessKeys)` yourself, then SqlAlchemy queries are being generated by a package you have installed, which could be:

* flask
* flask-sqlalchemy
* some other plugin for flask/sqlalchemy

If that's the case, the flask community is where you'll have to ask this question. They use IRC by preference - https://flask.palletsprojects.com/en/1.1.x/becomingbig/#discuss-with-the-community


Simon King

unread,
Jul 26, 2019, 4:44:33 AM7/26/19
to sqlal...@googlegroups.com
There was a similar question recently where it appeared that
flask_admin adds limits to queries:

https://groups.google.com/forum/#!msg/sqlalchemy/lL8G_sskwUA/DceTkOSoAAAJ
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
> ---
> You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/02cd13f1-edcf-4133-b804-39ddf885ef52%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages