[sqlalchemy] Re: Update multiple rows in SQLite Databse

2020-09-07 Thread William Phillips
I have finally found a way to insert, update and delete ingredients from the recipe application. It is probably not the best way but it works. First since I had a button in the form to add an ingredient, I used a button to delete a selected ingredient. As for the Update and insert into an existi

[sqlalchemy] Re: Update multiple rows in SQLite Databse

2020-08-29 Thread William Phillips
You are right, I misinterpreted Mike's suggestion. I expected "Unit of work" to be an code process but it's a concept. The changes to related data rows of the table in the recipe unit must be handled by my python code not SqlAlchemy. Since reading your comments, I have begun to develop a gen

[sqlalchemy] Re: Update multiple rows in SQLite Databse

2020-08-28 Thread 'Jonathan Vanasco' via sqlalchemy
I believe your error is tied to this section of code: > for item in ingredDict: > ingredient_item = Ingredients(ingredientKey=item['ingredientKey'], > > ingredientDescription=item['ingredientDescription'], >

[sqlalchemy] Re: Update multiple rows in SQLite Databse

2020-08-27 Thread William Phillips
My problem seems far from solved. Searching the internet for information on how to apply "unit of work" has proven difficult. I found general references but no practical examples on how to concretely apply the concept. I finally found one practical (but short) explanation at : Link to Unit of

[sqlalchemy] Re: Update multiple rows in SQLite Databse

2020-08-14 Thread William Phillips
Thank Mike for the input. My preliminary research on "Unit of work" has shown it is exactly what I need. Still have to learn how to use it but I'll get there. Again thanks. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code,