On 15 Aug 2004, Michael Watkins said:
> On Sun, 2004-08-15 at 01:10 +0100, Andrew Bennetts wrote:
>> There's already a "default" flag. When left with its default value
>> (NoDefault), probably SQLObject should just omit it from the INSERT
>> statement, rather than refuse to even try (or perhaps there should be
>> a default=OmitOk or something). Currently, there's no way to make
>> use of a "DEFAULT ..." declaration in a table definition.
>
> Yup, exactly. And that breaks the "SQLObject should fit in with
> existing schema's" goal.
Alright. So the solution is to have some way of telling it to use the
database's built-in default value if it exists.
It should probably be a boolean paramter to Col(), for simplicity.
Something like "defaultFromDB=True"? "useDBDefault=True"?
I don't like the "omit" bit. Too many negatives can get confusing,
especially with booleans (eg. notNull=False). :)
|