Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread Greg Silverman
Yes, I can certainly do that. Sounds pretty simple, actually. I may have more questions as I dive into this. Thanks! On Mon, Apr 24, 2017 at 3:06 PM, mike bayer wrote: > > > On 04/24/2017 03:42 PM, Greg Silverman wrote: > >> My naive first response would be that I

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread mike bayer
On 04/24/2017 03:42 PM, Greg Silverman wrote: My naive first response would be that I want the class to look like class DiagnosisTest(Model): __tablename__= 'vw_svc_diagnosis' #id = Column(Integer, primary_key=True, autoincrement=True) dx_id= Column(String(32),primary_key=True)

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread Greg Silverman
My naive first response would be that I want the class to look like class DiagnosisTest(Model): __tablename__ = 'vw_svc_diagnosis' #id = Column(Integer, primary_key=True, autoincrement=True) dx_id = Column(String(32), primary_key=True) first_name = Column(String(255))

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread mike bayer
On 04/24/2017 12:51 PM, Greg Silverman wrote: Hi Mike, I'm finally getting to this. Instead of having both a detail and grouped methods, I would like to have only the grouped method. I'm not sure I follow your suggestion for the two methods above and how that would be modified to fit into

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread Greg Silverman
Hi Mike, I'm finally getting to this. Instead of having both a detail and grouped methods, I would like to have only the grouped method. I'm not sure I follow your suggestion for the two methods above and how that would be modified to fit into the @property in my class. Could you please

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-02 Thread Greg Silverman
Mike, I'll try it and let you know the outcome (it may be a bit before I get to it, but I like your suggestions much better than having to use SQL views, which I am only doing due to a time crunch). Much appreciated! On Wed, Mar 1, 2017 at 9:52 PM, mike bayer wrote: >

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-01 Thread mike bayer
On 03/01/2017 10:22 PM, Greg Silverman wrote: On Wed, Mar 1, 2017 at 8:53 PM, mike bayer > wrote: On 03/01/2017 08:27 PM, GMS wrote: I have the following class models: | class DiagnosisDetail(Model):

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-01 Thread Greg Silverman
On Wed, Mar 1, 2017 at 8:53 PM, mike bayer wrote: > > > On 03/01/2017 08:27 PM, GMS wrote: > >> I have the following class models: >> >> >> | class DiagnosisDetail(Model): >> __tablename__ = 'vw_svc_diagnosis' >> diagnosis_id = Column(String(32),

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-01 Thread mike bayer
On 03/01/2017 08:27 PM, GMS wrote: I have the following class models: | class DiagnosisDetail(Model): __tablename__ = 'vw_svc_diagnosis' diagnosis_id = Column(String(32), primary_key=True) first_name = Column(String(255)) last_name = Column(String(255))

[sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-01 Thread GMS
I have the following class models: class DiagnosisDetail(Model): __tablename__ = 'vw_svc_diagnosis' diagnosis_id = Column(String(32), primary_key=True) first_name = Column(String(255)) last_name = Column(String(255)) mrn = Column(String(255))

[sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-01 Thread GMS
I have the following class models: class DiagnosisDetail(Model): __tablename__ = 'vw_svc_diagnosis' diagnosis_id = Column(String(32), primary_key=True) first_name = Column(String(255)) last_name = Column(String(255)) mrn = Column(String(255))