Re: [SQLObject] Is there a way to configure kinterbasdb (Firebird)?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Frank W. <fra...@no...> - 2009-09-16 14:59:36
|
i'm using sqlobject happily with interbase 7 via kinterbasdb.though not directly but together with the turbogears framework. connection uri is "interbase://user:pass@localhost :3050//path/to/file.IB?debug=True" it connects just fine i then define my classes as usual (already existed in database): class Teilnehmer(SQLObject): class sqlmeta: #fromDatabase=True # works more or less, but # there's trouble with string encodings idName="NR" cacheValues = True BUCHUNGSNR = IntCol(dbName="BUCHUNGSNR") NAME = StringCol(length=40, dbName="NAME") HOTELCODE = StringCol(length=8, dbName="HOTELCODE") ... finally i need some finetuning as the database doesn't have a charset defined: for each attribute/column: def _get_NAME(self): return self._SO_get_NAME() and unicode(self._SO_get_NAME(), 'iso-8859-1').strip() or u'' that's it. finally u can use all the convenient magic that comes with SQLObj. hth, frank 2009/9/16 Petr Jakeš <pet...@tp...> > Hi, > > Working on the Firebird, I just wonder if exists some way how to push > SQLObjects to configure kinterbasdb. > > I mean: I was able to use following snippet when I was working with the > database directly (using kinterbasdb). > > import kinterbasdb > kinterbasdb.init(type_conv=200) > > Is this possible using SQLObjects? > > Regards > > Petr > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > > |