Adrian,
On May 22, 7:45 pm, Adrian von Bidder wrote:
> I guess you just have to query for your string to see if it's unique.
> Performance-wise it shouldn't make a difference, and in Python, I usually
> find a simple if even nicer than a try-except block.
Yup, thanks, that is what we are doin
Michael,
On May 22, 6:03 pm, "Michael Bayer" wrote:
> have you considered using some more industrial strength "randomness", like
> GUIDs generated from the current timestamp or similar ? the python uuid
> module works very well for this.
That's probably the direction I'd go - just wanted to
On Friday 22 May 2009 12.01:05 Iwan wrote:
> Naïvely, I thought you'd create an X, flush it, and then catch any
> IntegrityError's thrown. [...]
I know that PostgreSQL can't continue in a transaction after an error, you
have to roll back the transaction. I don't know what the SQL standard says
Iwan wrote:
>
> Hi there,
>
> I am working with SqlAlchemy for the first time (coming from
> SqlObject), and I fear I may not understand it as well as I thought I
> did...
>
> I have a class (X), persisted with SA which contains a key (X.key)
> which is a randomly generated string of fixed length.