On Mon, 11 Mar 2019, Simon King wrote:

Using your Industries class, a function to return that list of names
could look like this:

def get_industry_names(session):
   q = session.query(Industries)
   return [i.ind_name for i in q.all()]

Does that do what you want?

Simon,

It probably will, but I don't yet have sufficient code to test it. I'm now
writing the views for all classes (which is what prompted my question) and
will test this function as soon as practical.

Thanks very much,

Rich

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to