On Tue, Sep 9, 2008 at 5:03 PM, alex bodnaru <[EMAIL PROTECTED]> wrote:
> hi gaetan,
>
> i will happily do the second change.
>
> as for the first, i didn't find a way to say when i have a (unicode)
> string instance, or a
> sequence of strings. (maibe if len(list(param)[0]) == 1 this was a string?

if isinstance(xxx, basestring):
    xxx = [xxx]

>
> will send soon.
>
> alex
>
> On Mon, Sep 8, 2008 at 5:10 PM, Gaetan de Menten <[EMAIL PROTECTED]> wrote:
>>
>> On Mon, Sep 8, 2008 at 3:42 PM, alex bodnaru <[EMAIL PROTECTED]> wrote:
>>> hello friends,
>>>
>>> with relative low effort, the elixir extensions mechanism allows us to
>>> add nice syntactic sugar to our entities.
>>>
>>> hence, one new extension, to allow us to create triggers upon table
>>> creation or drop them before, or to autopopulate the table with some
>>> constant data, thus to make it feel like usual constants in your
>>> sources.
>>>
>>> unfortunately, here you need raw ddl, compatible to your database, not
>>> generated by sa acording with the pydb drivers.
>>>
>>> the extension file is accompanied by a test file to test and exemplify
>>> it's usage.
>>>
>>> please enjoy, and eventually share your code too.
>>
>> It's a nice idea, but I do have a few comments:
>> - it would be nicer (and make the code cleaner/shorter) to have a
>> single ddl_statement argument which could take both a single statement
>> and a list of statements, instead of two different arguments.
>>
>> - the following line:
>>    for pair in self.entity.__ddl_statements__:
>> could be written more elegantly as:
>>    for when_to_execute, ddl_statement, ddl_arg in
>> self.entity.__ddl_statements__:
>>
>> --
>> Gaëtan de Menten
>> http://openhex.org
>>
>> >
>>
>
> >
>



-- 
Gaëtan de Menten
http://openhex.org

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

Reply via email to