Jose Soares wrote:
> I see, thus, this definition:
>Column('abc', Unicode(20), server_default='abc')
>Column('adef', Numeric(12,3), server_default=text('1.5')),
>
> is equivalent to this one:
>Column('abc', Unicode(20), DefaultClause('abc'))
>Column('def', Numer
I see, thus, this definition:
Column('abc', Unicode(20), server_default='abc')
Column('adef', Numeric(12,3), server_default=text('1.5')),
is equivalent to this one:
Column('abc', Unicode(20), DefaultClause('abc'))
Column('def', Numeric(12,3), DefaultClause(text('1.
you can use DefaultClause if you give it a text() object so that the quoting
behavior is defined. server_default is a shortcut for that.
jo wrote:
> Do you suggest to use server_default instead of DefaultClause in all cases?
> j
> Il giorno giovedì 8 gennaio 2015 15:17:20 UTC+1, Michael Bayer
Do you suggest to use server_default instead of DefaultClause in all cases?
j
Il giorno giovedì 8 gennaio 2015 15:17:20 UTC+1, Michael Bayer ha scritto:
>
> use server_default with text() as documented at
> http://docs.sqlalchemy.org/en/rel_0_9/core/defaults.html#server-side-defaults.
>
>
>
>
>
use server_default with text() as documented at
http://docs.sqlalchemy.org/en/rel_0_9/core/defaults.html#server-side-defaults.
jo wrote:
> Hi all,
>
> I have a problem with DefautClause. I need to assign a default to a numeric
> column.
> tbl['rischio_attivita'] = Table('rischio_attivita'
Hi all,
I have a problem with DefautClause. I need to assign a default to a
numeric column.
tbl['rischio_attivita'] = Table('rischio_attivita', database.metadata,
Column('id', Integer, Sequence('rischio_attivita_seq'),
primary_key=True),
Column('cod_attivita', Unicode(10),nul