On Fri, May 8, 2009 at 2:12 PM, Yarko Tymciurak <[email protected]> wrote:
> you might look at some of the backend code that sqalchemy uses to accomplish 
> this...
> See: http://www.sqlalchemy.org/docs/05/metadata.html#reflecting-tables
> Which will lead you to (in lib/sqlalchemy/schema.py) to MetaData.reflect() 
> ==> Table.__init__() ==> reflecttable();
> Many defined per specific db's (see lib/sqlalchemy/databases); reflecttable() 
> seems to be dispatched from lib/sqlalchemy/engine/base.py, and digested in 
> lib/sqlalchemy/databases.information_schema.py.
> Hopefully, the SQL in the reflecttable() of the individual database files 
> will be helpful for starters.

Thanks, Yarko. I'll see it later.
For now I'm using SQL_DIALECTS to map reversed: "database language" to
"web2py language" (example: 'string' -> 'CHAR(32)' in SQLite). It is
working.
The really "hard" work is to get table list and table fields (and
types) from DB.

--
Álvaro Justen
Peta5 - Telecomunicações e Software Livre
21 3021-6001 / 9898-0141
http://www.peta5.com.br/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to