> Why not use update({ESMagicNumber.last_access: datetime.datetime.now()}) ?
>
>
> one advantage of this syntax is that Python will raise an exception that
last_access does not exist.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this
Peter wrote:
> Hi
> I do:
>
> engine = create_engine('mysql://r...@localhost/tmp)
> Session = sessionmaker()
> Session.configure(bind=engine)
> connection = engine.connect()
> session = Session()
>
> # suppose database TEST exists
> connection.execute('CREATE DATABASE IF NOT EXISTS TEST')
>
> Why d
Hi
I do:
engine = create_engine('mysql://r...@localhost/tmp)
Session = sessionmaker()
Session.configure(bind=engine)
connection = engine.connect()
session = Session()
# suppose database TEST exists
connection.execute('CREATE DATABASE IF NOT EXISTS TEST')
Why does this gives a warning :
/usr/lib
This is exactly what I was looking for, thank you.
Tom
On Nov 23, 2009 12:42 PM, "Conor" wrote:
Tom Burdick wrote: > Ok, here's a small test. It actually works fine when
using sqlite, but > not wh...
You can use sqlalchemy.cast() to coerce the type on the DB side:
coerced_teststr = cast(teststr
Tom Burdick wrote:
> Ok, here's a small test. It actually works fine when using sqlite, but
> not when using postgresql. I want it to work with postgresql!
>
> This probably helps more than the description above.
>
> http://www.pylonshq.com/pasties/fe6a2857f3f72d499914caabce0d41bc
>
> -Tom
>
> On N
Ok, here's a small test. It actually works fine when using sqlite, but
not when using postgresql. I want it to work with postgresql!
This probably helps more than the description above.
http://www.pylonshq.com/pasties/fe6a2857f3f72d499914caabce0d41bc
-Tom
On Nov 23, 10:33 am, Tom Burdick wrote
I would like to present my users a simple search box that searches a
table.
I have issues getting DataError when using the text input and trying
to do filter against a column that is an integer only column.
I want to have some code that takes a particular sqlalchemy column
object and attempts to
chaouche yacine wrote:
> --- On Sun, 11/22/09, Conor wrote:
>
>
>> There is a problem with your code when the tag is in the
>> cache: if the
>> tag is added to the session via session.add or a relation
>> "add" cascade,
>> SQLAlchemy will try to INSERT the tag into the database on
>> the next
>
--- On Sun, 11/22/09, Conor wrote:
> There is a problem with your code when the tag is in the
> cache: if the
> tag is added to the session via session.add or a relation
> "add" cascade,
> SQLAlchemy will try to INSERT the tag into the database on
> the next
> flush.
> -Conor
I don't know, it