Hi Oleg & thanks for your answer

> > - Is there a possibility to use SQLObjects to access data of two (or
more)
> > different DBs at once? This is e.g. the case where you're importing
data
> > from an external source.
>
>    It is possible - every SQLObject method accept a connection parameter.
> Open two different connections and pass them as needed.

Ah, I'll try that.

>
> > - Inserts into a DB are painfully slow when there are many rows.
>
>    Then do not use SQLObject for bulk insertion. Use sqlbuilder.Insert().
> Search for examples in the archive of the mailing list.

Yes, that's just a bit awkward and you kind of loose sqlobject's
abstraction.

>
> > There
> > should be a possibility to queue up the inserts and perform them using
a
> > single query
>
>    Patches will be gladly accepted.

I'll take a look. The problem is, we're currently on 0.7 and I wouldn't
think adding something to this version is likely to run on svn HEAD, right?
Maybe we could switch to HEAD. How stable is HEAD then?

>
> > - Deleting rows is equally slow. From what I can see, there is no
> > sresult.destroy() (or something) that would allow deleting many objects
> > with a single query.
>
>    sqlbuilder.Delete(). Do not forget to clear connection caches -
> connection.cache.clear()

Ah yes, I was actually aware of that. But unless I'm getting something
wrong,using sqlbuilder.Delete results in the following statements:

conn = sqlobject.sqlhub.getConnection()
conn.query(conn.sqlrepr(Delete(Klass.sqlmeta.table, Klass.q.otherKlassID =
10)))

What I would like to do is pass an sresult directly:

sqlobject.Delete(Klass.selectBy(otherKlassID = 10))

or even

Klass.selectBy(otherKlassID = 10).destroy()

Or am I missing something?

Thanks!

PS: I'm really sorry about that large signature, but, unfortunately,
changing it is beyond my reach. It's our proxy that adds it (same as it
inhibits using a web mail client...).
___________________________________________________________________

Disclaimer:


Diese Mitteilung ist nur fuer die Empfaengerin / den Empfaenger bestimmt.

Fuer den Fall, dass sie von nichtberechtigten Personen empfangen wird,
bitten wir diese hoeflich, die Mitteilung an die ZKB zurueckzusenden und
anschliessend die Mitteilung mit allen Anhaengen sowie allfaellige Kopien
zu vernichten bzw. zu loeschen. Der Gebrauch der Information ist verboten.


This message is intended only for the named recipient and may contain
confidential or privileged information.

If you have received it in error, please advise the sender by return e-mail
and delete this message and any attachments. Any unauthorised use or
dissemination of this information is strictly prohibited.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to