[SQLObject] beginers question about geting columns names and litle more
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Predrag P. <pe...@cg...> - 2004-09-02 17:30:25
|
Hi, I'm trying to use Python + SQLObject to develop some simple DB application for my use. I'm pretty new in python and in the SQLObject and think that this is trivial question but I don't know how to solve it. So please help. 1. How to get columns name, format , size and rest of attributes (like text size, notNull) from an SQLObject? In version 0.5.2 I use: s = SomeSQLObject.select()[0] columnName = s._columns[0].kw['name'] how can I do something like this in 210 version from svn (is this some regular way to get that information) 2. How to set additional parameters to Firebird connection, like: charset, role, dialect? In 0.5.2, I modified methods: ------------------------------------------------------------------ class FirebirdConnection(DBAPI): def __init__(self, host, db, user='sysdba', passwd='masterkey', autoCommit=1, + #insert by me + role=None, charset=None, dialect=0, + #end of insert **kw): ... + #insert by me to support additional option of firebird database + self.dialect = dialect + self.charset = charset + self.role = role + #end of insert def makeConnection(self): #Modified by me to add support for charset, role and dialect return kinterbasdb.connect( host = self.host, database = self.db, user = self.user, password = self.passwd, + role = self.role, charset = self.charset, + dialect = self.dialect ) ------------------------------------------------------------------ end get what I need. But now it's look that FirebirdConnection method is deprecated. Do you have plans to insert this connection options in some future release, and how do you think to do that? And how do you suggest to modify 210 version from svn to get features that I need. I'm just want to know that to be easy to me to migrate on new version of SQLObject. Thanks in advance, and sorry for my bad English Predrag Peranovic |