Re: [SQLObject] Re: security related question

2006-03-30 Thread Oleg Broytmann
On Thu, Mar 30, 2006 at 05:48:53PM -0300, Jorge Godoy wrote: > Oleg Broytmann <[EMAIL PROTECTED]> writes: > >I see a way to do it once for the entire program using metaclasses but > > it's too complex to explain in a short email. (At least I think I see a > > way, but I may be wrong...) > > Us

[SQLObject] Re: security related question

2006-03-30 Thread Jorge Godoy
Oleg Broytmann <[EMAIL PROTECTED]> writes: >I see a way to do it once for the entire program using metaclasses but > it's too complex to explain in a short email. (At least I think I see a > way, but I may be wrong...) Using a decorator might also be an interesting idea. It can wrap the func

[SQLObject] Re: security related question

2006-03-30 Thread Jorge Godoy
Ivan Horvath <[EMAIL PROTECTED]> writes: > and how can be solved this problem? I'd try capturing the exception. If it is captured then the program doesn't terminates and you can change the error message. > because if i'm right this is a kind of grey box (psycopg). at > least in m

Re: [SQLObject] security related question

2006-03-30 Thread Oleg Broytmann
On Thu, Mar 30, 2006 at 09:40:05PM +0200, Ivan Horvath wrote: > and how can be solved this problem? Wrap an every call to SQLObject methods that access database with try/except and log the exception but do not show it to users. I see a way to do it once for the entire program using meta

Re[2]: [SQLObject] security related question

2006-03-30 Thread Ivan Horvath
Dear Oleg, i see and how can be solved this problem? because if i'm right this is a kind of grey box (psycopg). at least in my windows environment (i have a pyd, and a dll files in the DLLs folder). this is out of sqlobject, isn't it? to be honest i don't want t

Re: [SQLObject] security related question

2006-03-30 Thread Oleg Broytmann
On Thu, Mar 30, 2006 at 09:10:43PM +0200, Ivan Horvath wrote: > during my test i had a connection problem, and i received the > following text: > > could not connect to server: Connection timed out (0x274C/10060) > Is the server running on host "172.16.144.43" and accept

[SQLObject] security related question

2006-03-30 Thread Ivan Horvath
Dear sqlobject-discuss, during my test i had a connection problem, and i received the following text: could not connect to server: Connection timed out (0x274C/10060) Is the server running on host "172.16.144.43" and accepting TCP/IP connections on port 5432? ;

Re[2]: [SQLObject] UnicodeCol question

2006-03-30 Thread Ivan Horvath
Dear Oleg, thank you Thursday, March 30, 2006, 7:19:36 PM, you wrote: OB> On Thu, Mar 30, 2006 at 06:33:05PM +0200, Ivan Horvath wrote: >> but when i try Workpackage.byCode(X) it fails >> is a unicode string OB>.select()/.selectBy()/.by*() accepts only strings. Encode XXX

[SQLObject] SQLJoins do not respect sqlmeta._perConnection

2006-03-30 Thread Luke Opperman
Bug in SQLMultipleJoin and SQLRelatedJoin, the non-SQL versions check inst.sqlmeta._perConnection and load the joined objects using inst._connection, but the SQL versions never specify a connection. I won't have time to write a test for this patch till at least tomorrow or early next week, but fig

Re: [SQLObject] UnicodeCol question

2006-03-30 Thread Oleg Broytmann
On Thu, Mar 30, 2006 at 06:33:05PM +0200, Ivan Horvath wrote: > but when i try Workpackage.byCode(X) it fails > is a unicode string .select()/.selectBy()/.by*() accepts only strings. Encode XXX to DB encoding: .byCode(XXX.encode('UTF-8')) Oleg. -- Oleg Broytmann

[SQLObject] UnicodeCol question

2006-03-30 Thread Ivan Horvath
Dear sqlobject-discuss, i have the following class definitions class BaseObj(sqlobject.SQLObject): _connection = conn class sqlmeta: lazyUpdate=1 class BaseObjColName(BaseObj): code = sqlobject.UnicodeCol(length=20, unique=1, notNone

[SQLObject] problem with creating SQLObject

2006-03-30 Thread Grzesiek Slusarek
Hi all. I have problem with creating object (new row in datebase ). I'm using SQLObject 0.7 with MySql 5.0.18. Here is the definition of the table that I want to create new row. class CCache(SQLObject): class sqlmeta: table='cache_catalog' Type = StringCol(length=10) User = For

Re: [SQLObject] MySQL and running out of `id' space...

2006-03-30 Thread Oleg Broytmann
On Thu, Mar 30, 2006 at 04:17:22PM +0200, Uwe Grauer wrote: > I was told that there is no way in SQLObject to use pk's which aren't > INT's. > There is no way to specify what the PK-Type is. Currently primary keys can be of types int and str. Oleg. -- Oleg Broytmannhttp://phd

Re: [SQLObject] MySQL and running out of `id' space...

2006-03-30 Thread Uwe Grauer
Vetlugin Yury wrote: > Actually I have some positive xp in that ;) > I`ve patch sqlobject: > 1) In mysqlconnection.py I`ve replaced INT type with INT UNSIGNED type in > createIDColumn and joinSQLType functions. > 2) In cols.py I`ve replaced INT with INT UNSIGNED in SOKeyCol._mysqlType. > > It w

Re: [SQLObject] MySQL and running out of `id' space...

2006-03-30 Thread Vetlugin Yury
Actually I have some positive xp in that ;) I`ve patch sqlobject: 1) In mysqlconnection.py I`ve replaced INT type with INT UNSIGNED type in createIDColumn and joinSQLType functions. 2) In cols.py I`ve replaced INT with INT UNSIGNED in SOKeyCol._mysqlType. It works fine for me, but I`m not shore

Re: [SQLObject] MySQL and running out of `id' space...

2006-03-30 Thread Uwe Grauer
Jaime Wyant wrote: > Ok, I've created a sqlobject like so: > > class Output(SQLObject): > print_job = ForeignKey("PrintJob", notNone = True) > piece_id = IntCol(notNone = True) > > ... > > Currently I have about 1.7 million rows in there. SQLObject created the > `id' column for the