Marek Kubica | 1 May 2004 11:40
Picon

Re: The Gadfly Backend

On Fri, 30 Apr 2004 14:45:46 +0200
Philippe Normand <sweafty <at> free.fr> wrote:

> In my opinion the URI system is far more powerfull. For instance, if I
> want to store db login/passwd, etc in a config file it is not so
> trivial to handle Connection types. URIs can be easily stored in
> config files, all the informations (db type, login, passwd, db name)
> reside in a simple string.

I absolutely agree, but I thought there would be some releases with botz
systems.

greets,
Marek

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Marek Kubica | 1 May 2004 11:39
Picon

Re: The Gadfly Backend

On Fri, 30 Apr 2004 10:42:57 -0500
Ian Bicking <ianb <at> colorstudy.com> wrote:

> I have to look at this more, but the old system is supposed to work,
> and should continue to work at least for a release or two (or more).

That's why I wondered.

greets,
Marek

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Oleg Broytmann | 4 May 2004 14:45
X-Face
Picon
Favicon

Long int conveter

Hi!

   There is a problem in the Converters.py, IntConverter (SQLObject 0.5.2):

>>> repr(int(11111111111111111111111111L))
'11111111111111111111111111L'

   And of course Postgres complaints about that 'L'.

   The code should be something like

def IntConverter(value, db):
    s = repr(int(value))
    if s[-1] == 'L':
        s = s[:-1]
    return s

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Oleg Broytmann | 7 May 2004 16:43
X-Face
Picon
Favicon

Creating a new object

Hi!

   A few weeks ago I complained about slowness of SQLObject.new():
http://article.gmane.org/gmane.comp.python.sqlobject/1443
   The figures are: QPS-based script does 180 INSERTs per second,
SQLObject does 2 or 3 :( QPS-based script runs 3 minutes,
SQLObject-based - 2.5 hours )':

   I patched SQLObject a bit (the patch is attached). In short, the
patch prevents SELECT after INSERT. This is not a universal patch, of
course - just an ugly hack to do an experiment.
   Well, now SQLObjects does 120 INSERTs per second and the script runs
4.5 minutes. Much better!

   So SQLObject by itself is not very slow - it is that excessive SELECT
that makes things so slow. Now I need to invent a patch to disable it.
In my opinion the simplest way will be to pass a row of values to the
_init() from _SO_finishCreate(). Is it a correct way?

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
*** /usr/local/lib/python2.3/site-packages/SQLObject/SQLObject.py	Fri Apr 23 21:16:05 2004
--- SQLObject.py	Fri May  7 18:23:37 2004
***************
*** 768,774 ****

(Continue reading)

Gavin | 9 May 2004 15:30

Keyword argument error

With the following code:
    import streamcast

    streamcast.StreamSources(stream_name='Enemy Combatant         
Radio',stream_source='http://radio.indymedia.org:8001/sf-hifi.mp3',start_date='2004-05-09 
23:25:00',end_date='2004-05-09 23:30:00')

I get this error:
    TypeError: __new__() got an unexpected keyword argument 'stream_name'

The StreamSource class:
    class StreamSources(SQLObject.SQLObject):

        db = Database()

        _connection = 
SQLObject.MySQLConnection(db=db.name,user=db.user,passwd=db.password)
        _style = SQLObject.Style()
        _table = 'streamcast'

        stream_name = SQLObject.StringCol(length=150,notNull=True)
        stream_source = SQLObject.StringCol(length=255,notNull=True)
        start_date = SQLObject.DateTimeCol(notNull=True)
        end_date    = SQLObject.DateTimeCol(notNull=True)
        default_stream = SQLObject.BoolCol()

- Gavin

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
(Continue reading)

Scott Russell | 9 May 2004 16:13

Re: Keyword argument error

On Sun, 2004-05-09 at 09:30, Gavin wrote:

>     streamcast.StreamSources(stream_name='Enemy Combatant         
> Radio',stream_source='http://radio.indymedia.org:8001/sf-hifi.mp3',start_date='2004-05-09
> 23:25:00',end_date='2004-05-09 23:30:00')
> 
> I get this error:
>     TypeError: __new__() got an unexpected keyword argument 'stream_name'
> 

What version of SO?  If it's an older one (even maybe the current
stable), you need to change

streamcast.StreamSources(stream_name='Enemy Combatant
to
streamcast.StreamSources.new(stream_name='Enemy Combatant

This has changed in recent versions, though, so YMMV.

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
Eduardo Elgueta | 10 May 2004 23:37
Picon

SQLObject Events

Hi All,

I have some basic audit fields in my tables, that I used to update in my 
rudimentary ORM superclass.

I've seen in the FAQ/docs that SQLObject classes are not meant to be 
subclassed, so I was thinking that may be there is some event that I can 
hook into, but this related post 
(news://news.gmane.org:119/1080605589.21688.13.camel <at> gandalf) received 
no answer.

That only leaves me the option to find the method where sql statements 
are passed to the db driver and intercept/modify this statements.

Is this feasible? If so, where should I look?

TIA.

Ed.

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
Oleg Broytmann | 11 May 2004 09:59
X-Face
Picon
Favicon

Re: SQLObject Events

On Mon, May 10, 2004 at 05:37:21PM -0400, Eduardo Elgueta wrote:
> I have some basic audit fields in my tables, that I used to update in my 
> rudimentary ORM superclass.
> 
> I've seen in the FAQ/docs that SQLObject classes are not meant to be 
> subclassed

   There was a Daniel Savard's inheritance patch. I cannot find it on
the web, but I have patches for SQLObject 0.5.1 and 0.5.2.

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
Gavin | 11 May 2004 10:55

New method

With the new method, I get an error about regarding a missing argument 
to the method for a notNull db field. Do you have to enter every field 
with the new method?
- Gavin

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
Eduardo Elgueta | 11 May 2004 15:16
Picon

Re: SQLObject Events

Oleg,

Thank you for your answer.

I'm not sure inheritance is what I need, but I'll certainly give it a 
try. Where can I get that patch?

Ed.

Oleg Broytmann wrote:

> On Mon, May 10, 2004 at 05:37:21PM -0400, Eduardo Elgueta wrote:
> 
>>I have some basic audit fields in my tables, that I used to update in my 
>>rudimentary ORM superclass.
>>
>>I've seen in the FAQ/docs that SQLObject classes are not meant to be 
>>subclassed
> 
> 
>    There was a Daniel Savard's inheritance patch. I cannot find it on
> the web, but I have patches for SQLObject 0.5.1 and 0.5.2.
> 
> Oleg.

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
(Continue reading)


Gmane