Given a table with a column like:
CREATE TABLE Foo (
datecreated timestamp NOT NULL DEFAULT
(CURRENT_TIMESTAMP AT TIME ZONE 'UTC'),
There is no way to utilise that default value when
constructing a Foo. e.g., if that is the only column
in Foo, it should be possible in Python to do:
f1 = Foo()
But even though the default value for the DateTimeCol's
default argument is NoDefault, SQLObject still insists
that an argument is passed to Foo's constructor.
For backwards compatibility, probably what should be
done is define a new magic value, e.g.
'NoDefaultRequired', so that the Foo class could be
datecreated = DateTimeCol(notNull=True,
Log in to post a comment.