summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-03-15 16:49:47 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-03-15 16:49:47 +0000
commit83244ec631e5b544d575337bd4fd7bb2e31e9ac3 (patch)
treee2c5a12dad4e19c6bbc2f1dd326f47e6bbcb50a7
parent30b20e3c563d10935b1c85f43d0b7b3054f81415 (diff)
downloadsqlalchemy-83244ec631e5b544d575337bd4fd7bb2e31e9ac3.tar.gz
literals in PassiveDefault require text()
-rw-r--r--doc/build/content/metadata.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/build/content/metadata.txt b/doc/build/content/metadata.txt
index 23c411412..38785f3c5 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')