On Fri, Apr 22, 2016 at 5:57 PM, Mike Bayer <mike...@zzzcomputing.com> wrote: > > On 04/22/2016 11:51 AM, Piotr Dobrogost wrote: >> >> >Column('some_col', nullable=False, info={"oracle_not_null": False}) >> > >> >then in your @compiles recipe look for column.info >> <http://column.info/>['oracle_not_null'] >> >while at the same time looking at compiler.dialect.name >> <http://compiler.dialect.name/> == 'oracle'. >> >> I get it. However as we want this for every autoincrement column I guess >> we can check for already provided "autoincrement" flag and avoid passing >> column.info altogether. Nice. >> >> It seems like this could be used to render IDENTITY keyword for >> autoincrement columns for Oracle 12c which I asked about recently in my >> post titled "Support for Oracle 12c auto increment (IDENTITY) columns?" >> (https://groups.google.com/forum/#!topic/sqlalchemy/Jg_kV6VF0_E). > > > yes, you can write whatever rendering you want in there.
Do I see right, that using @compiles(schema.CreateColumn, 'oracle') is not good as it's being invoked too late to have access to colspec? It seems I have to override DDLCompiler.get_column_specification() and then I have to copy & paste code from this method because there's no way to reuse code which generates DEFAULT and NULL statements, yes? Overriding DDLCompiler.get_column_specification() means I subsequently have to "register" my DDLCompiler's subclass somehow. How do I do it? I did not find any information on this in docs. Looking at PGDialect in source, there's ddl_compiler attribute but I don't see any API to change it. You don't want me to monkey patch OracleDialect, do you?. Regards, Piotr Dobrogost ps. I have an impression there's hardly any traffic on #sqlalchemy during Europe's working hours :( -- 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 https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.