On Saturday 14 June 2008 06:28:58 Russell Warren wrote:
> > if you'd like to specify a value generator for the columns, just
> > use a ColumnDefault.  Whatever function or SQL you like will be
> > called if no value is present - its just in this case we can't
> > rely upon SQLite's OID generation.
>
> Thanks - I'll look into that.  I just have to figure out how to
> make ColumnDefault dialect dependent.
>
> > I wouldn't favor a built in system of "guessing" within the
> > sqlite dialect how to autoincrement a composite PK field without
> > explicit user intervention.
>
> Why not?  Is it really guessing when the table has been defined
> precisely within SQLA?  If you have a Column that has been defined
> to be an Integer primary key that is supposed to autoincrement, and
> you are using sqlite... how could you be wrong?  The worst case I
> can think of is if sqlite changes in the future to actually support
> it, in which case you'd either change the dialect or get an error. 
> No?
maybe the user should request it somehow. Here come extra 
dialect-preferences. e.g. Column may mantain an attribute 
extras4sqlite, eventualy containing a dict of sqlite-specific 
settings; same for postgres etc. Then the specific dialect can look 
the column and get his own extra-settings - if any. This gives 
explicitness, separation of concerns (generic vs specific), and 
flexibility together. And this can be applied to other objects, e.g. 
tables or whatever. i'm sure thre are things u can do with tables in 
postgress and u cannot do in sqlite. 
Once some feature/attribute is considered generic/unified, it is moved 
from those extra* settings into the usual place -- or vice versa if 
stops being generic.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to