From 83244ec631e5b544d575337bd4fd7bb2e31e9ac3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 15 Mar 2007 16:49:47 +0000 Subject: [PATCH] literals in PassiveDefault require text() --- doc/build/content/metadata.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/build/content/metadata.txt b/doc/build/content/metadata.txt index 23c411412c..38785f3c50 100644 --- a/doc/build/content/metadata.txt +++ b/doc/build/content/metadata.txt @@ -419,7 +419,7 @@ A PassiveDefault indicates an column default that is executed upon INSERT by the {python} t = Table('test', meta, - Column('mycolumn', DateTime, PassiveDefault("sysdate")) + Column('mycolumn', DateTime, PassiveDefault(text("sysdate"))) ) A create call for the above table will produce: @@ -437,7 +437,7 @@ PassiveDefault also sends a message to the `Engine` that data is available after Column('my_id', Integer, primary_key=True), # an on-insert database-side default - Column('data1', Integer, PassiveDefault("d1_func")), + Column('data1', Integer, PassiveDefault(text("d1_func()"))), ) # insert a row r = mytable.insert().execute(name='fred') -- 2.47.3