that's the only way we can tell if a table exists.  We catch the exception for 
DESCRIBE, determine that its the exception we expect, and return True or False. 
 There have already been issues in the gaerdbms dialect regarding Google's 
exception formatting here being inconsistent.  you should emulate the approach 
here: 
http://hg.sqlalchemy.org/sqlalchemy/file/21043b66fe2e/lib/sqlalchemy/dialects/mysql/gaerdbms.py#l67





On Apr 24, 2013, at 4:06 PM, Rodrigo Moraes <rodrigo.mor...@gmail.com> wrote:

> Guys,
> I worked on an improvement to the `mysql+gaerdbms` dialect that allows
> it to connect to a local database when using the development server.
> The new dialect is here:
> 
>    http://stackoverflow.com/a/16198395/125967
> 
> However, something very odd happens when calling
> `metadata.create_all()`: at some point it calls `DESCRIBE` on the yet-
> to-be-created table. Using the following dummy example:
> 
>    https://gist.github.com/moraes/dfe12eb44c2bcb47c166
> 
> When I call `table.create()` (or `for table in metadata.sorted_tables:
> table.create()`) it works. Then I drop all tables and try again
> calling `metadata.create_all()`. And for some reason it executes a
> `DESCRIBE` for a table that doesn't exist, and an exception occurs.
> This is the echo:
> 
>    https://gist.github.com/moraes/ac3cb12c9e6a6d70c6dd
> 
> I'm very new to SqlAlchemy, so for those familiar with dialects: any
> clues why this is happening? :)
> 
> Thank you.
> -- rodrigo
> 
> -- 
> 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 http://groups.google.com/group/sqlalchemy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
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 http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to