/p5grh/sqlalchemy_whats_the_idiomatic_way_of_writing/
>
> I mentioned ticket #960 as where we'd someday support "MERGE" and its
> variants, but this can also be rolled with @compiles, see the example in that
> ticket.
>
> http://www.sqlalchemy.org/trac/ticket/960
>
>
> On Jan 31, 2012, at
when using SqlAlchemy Core (not using Session/ORM)?
I have quite a few tables with composite primary keys that can use it
for optimization.
At the moment what I have is quite ghetto, below is a contrive example
of it:
stmt = str(user_table.insert().values(email=email, name=name))
stmt +=
Hi all,
when running engine.execute("my query without optional escaped
arguments").fetchall(),
/Library/Python/2.6/site-packages/SQLAlchemy-0.6beta1-py2.6.egg/sqlalchemy/engine/base.py:
self.__distill_params returns an empty tuple.
but, inside /Library/Python/2.6/site-packages/MySQLdb/curso
nose works by running python files and methods that contain the word 'test',
some people use nose to call their UnitTest objects. But you don't have to
do this, you can get up to speed by using assert x == y for example.
As 1 possible implementation, you can have setup() method in your test file
t
Print out your Table object, see if that column was defined as you
expected by reflect()
On Aug 13, 2009, at 3:29 AM, Julien Cigar wrote:
>
> I just tried :
>
> datetime(2009, 13, 12, 10, 12, tzinfo=pytz.timezone('Europe/
> Brussels'))
>
> instead of :
>
> datetime(2009, 13, 12, 10, 12)
>
>
Dusan,
I believe you can use declarative_base to define your ORM,
and then either use autoload=True on its Table object, or
set Base.metadata.reflect(bind=your_db_engine) to reflect all of your db
tables.
See:
http://www.sqlalchemy.org/docs/05/ormtutorial.html
http://www.sqlalchemy.org/docs/0
I think Werkzeug guys talk about this before. Werkzeug is barebone WSGI
tools, which might suits your need?
Hopefully this link helps:
http://dev.pocoo.org/projects/werkzeug/wiki/SQLAlchemyAndWerkzeug
- Didip -
On Mon, Jul 13, 2009 at 8:15 AM, Matt Wilson wrote:
>
> I'm writing a really tiny W
If you define your column as DateTime, then SA will use the db's datetime
column.
If you want to store time in integer, i think you can just set the column to
integer, and set the column value as int(time.time())
- Didip -
On Thu, Jul 2, 2009 at 9:52 AM, Lukasz Szybalski wrote:
>
> Hello,
> Wha
If you are open to non RDBMS solution, sounds like what you need is message
queue system.
At work, we use RabbitMQ (memory-only) and have been quite happy with it.
SecondLife posted their discovery about MQ here:
http://wiki.secondlife.com/wiki/Message_Queue_Evaluation_Notes
- Didip -
On Mon, J
I believe you can look inside object's __dict__ for list of field names.
There are plenty of information you can pull from orm.Mapper. Those are
explained better here:
http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html
- Didip -
On Thu, Jun 25, 2009 at 6:12 PM, Chris Withers wrote:
Quick note about __init__ method. SA select(..) or query(...) does not call
__init__(), so your to upper logic won't be executed then. If you want it to
be called every object construction you need to do this:
from sqlalchemy import orm
@orm.reconstructor
def some_function():
self.field1=field
You have Syntax Error here:
('sdsd':'sdsds')
That one should be tuple right?
- Didip -
On Mon, Jun 8, 2009 at 6:14 AM, Ash wrote:
>
> Hello ,
>
> I am trying to insert in the table using two ways in the values which
> i show below
>
> engine = sqlalchemy.create_engine()
> metadata = MetaData(
If you are looking for ORM in c++, maybe this conversation can help:
http://stackoverflow.com/questions/74141/good-orm-for-c-solutions
- Didip -
On Sun, Jun 7, 2009 at 11:56 PM, Jarrod Chesney wrote:
>
> Hi All
> Does anyone knows where i can find information about using SQLAlchemy
> from c++ o
13 matches
Mail list logo