From: Marek K. <pyt...@we...> - 2004-04-26 10:54:13
|
Gadfly can be used both embedded (like sqlite) and standalone (like mysql), although I havent tested this before. But I'll only work on the embedded version. First I checked out SQLObject revision 104. I started the work by copying the sqlite package and replacing all 'sqlite' by 'gadfly'. (Gadfly is probably very like SQLite). Then I added to the main __init__.py. In the file gadflyconnection.py I modified the code to open a gadfly database. That's where I paused. I also modified the simpleperson.py for the Gadfly backend: File: simpleperson.py: from sqlobject import * __connection__ = GadflyConnection('gad.fly.db') class Person(SQLObject): _connection = __connection__ firstName = StringCol() middleInitial = StringCol(length=1, default=None) lastName = StringCol() Person.dropTable(ifExists=True) Person.createTable() Trying to run it: File "C:\sqlobject\sqlobject\main.py", line 943, in dropTable if ifExists and not cls._connection.tableExists(cls._table): AttributeError: 'NoneType' object has no attribute 'tableExists' That doesn't wonder. But where in sqlite can I find tableExists? greets, Marek |