-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Bayer ha scritto: > [...] > I'm not sure, however, if `test_schema` method test should go in > `test/engine/test_reflection.py`, since it is not directly related to > reflection. > > With the old patch > (http://www.sqlalchemy.org/trac/attachment/ticket/1679/schema.patch) > the code was in the HasSchemaTest class, so it was ok (the same is done > for HasSequenceTest). > > > P.S.: I have removed the supports_schema flag. > >> can you attach the latest that you have to the ticket.
Done. > Also I thought >> perhaps we should make sure "has_schema()", "has_table()", >> "has_sequence()" are present on the Inspector interface since that's where >> we want the "public" API to be for this stuff. Also >> get_sequence_names() would be nice too. > How are things supposed to work? As an example, we have: * Dialect.get_table_names * Engine.table_names * Inspector.get_table_names The Inspector method checks if the Dialect instance has a `get_table_names` method defined, but it seems, to be, that this method is *always* defined, and raises NotImplementedError if not supported by the dialect; is this a bug or I'm missing something? `Engine.table_names` is just a wrapper around `Dialect.get_table_names` that make sure the schema and the connection are properly set. So we have a public interface implemented in the Engine and another one implemented in the Inspector. As far as I can understand, `has_schema`, `has_table` and so on, are only used by the engine, during the visitor phase, to avoid to create a table or sequence if this already exists (and the metadata object has checkfirst set to True). There is no need for them in the Inspector. Manlio -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkuL72UACgkQscQJ24LbaURdmQCcC3pCe+X7wvBZEAoO5FYpvBGO 1rQAnijVQ9MNxK7PJYqQkKXb9IHWTTVe =Zoxs -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.