[IronPython] Database Engine for Django on IronPython
Markus Törnqvist
mjt at nysv.org
Sun Oct 25 16:09:50 CET 2009
On Sun, Oct 25, 2009 at 05:05:30AM -0700, Vernon Cole wrote:
>
>I have been thinking About this in re STORM too. Perhaps the best way
>would be like:
>
>Try:
> Import prefferedDb as db
> Db.version = 'native'
>Except:
> Import adodbapi as db
># then later if needed
>If db.version = 'native':
> # do usual thing
>Else:
> # do ado thing
>....
>So all of the database specific stuff remains in that module, which
>will then use ado if the preffered ifc is not available.
If I get you right, this is a good first step!
Then the next issue would be how to communicate with the db.
I think my solution would be to implement ADO engines one by one kinda
like I laid out in the other email, that a setting would stand for eg
MSSQL.
I also think there's a reason why django-mssql took to the regexps; it
kinda loses out on the ADO methods, but it's the path of least resistance
to code. And we can probably borrow code from them here! ;)
What do you think?
--
mjt
More information about the Ironpython-users
mailing list