Re: [sqlalchemy] Does "reflection" reflects everything in an existing SQLite database?

2014-03-21 Thread Michael Bayer
On Mar 21, 2014, at 5:01 PM, Bao Niu wrote: > Hi Michael, > > Thanks for your explanation. Let me build on your explanation and ask for > some further clarification. > Suppose I have the following snippet: > > import sqlalchemy > import sqlalchemy.ext.declarative > import sqlalchemy.orm > imp

Re: [sqlalchemy] Does "reflection" reflects everything in an existing SQLite database?

2014-03-21 Thread Bao Niu
Hi Michael, Thanks for your explanation. Let me build on your explanation and ask for some further clarification. Suppose I have the following snippet: import sqlalchemy import sqlalchemy.ext.declarative import sqlalchemy.orm import sqlalchemy.engine @sqlalchemy.event.listens_for(sqlalchemy.engi

Re: [sqlalchemy] Does "reflection" reflects everything in an existing SQLite database?

2014-03-21 Thread Michael Bayer
when using FK constraints with sqlite, the only impact that "PRAGMA foreign_keys=ON" has is whether or not the foreign keys are enforced when INSERT, UPDATE or DELETE statements are received by the sqlite database.It has no impact on reflection, SQLite is nice enough to tell us about the FOR

[sqlalchemy] Does "reflection" reflects everything in an existing SQLite database?

2014-03-20 Thread Bao Niu
I created a database manually using simple sqlite3 in python. When I load tables in that database using SqlAlchemy's reflection mode, i.e. setting autoload=True, I know all the columns will be reflected and mapped to the corresponding classes. However, I'm NOT so sure if the following details w