Hi,
I'm using SQA core to improve my app performance.
I'v got the following db update request:
engine.execute(Person.__table__.update().\
where(Person.name == peter).\
values(is_stafff=True))
When peter does not exist, is there a
()
my_object = session.query(...).one()
session.refresh(my_object) # - is this line needed?
return my_object
Thanks again for your time supporting a newbie.
Pierre
On Monday, January 20, 2014 5:12:58 PM UTC+1, pr64 wrote:
Hi,
Strange behaviour with sqa in multi-process
)
session_maker = scoped_session(session_factory)
session = session_maker()
Is this a correct way to achieve multi-process correct behaviour?
Thanks
On Monday, January 20, 2014 5:12:58 PM UTC+1, pr64 wrote:
Hi,
Strange behaviour with sqa in multi-process environment... already posted
Hi,
Strange behaviour with sqa in multi-process environment... already posted
on StackOverflow for a web app but still missing some understanding so
posting here.
I've created an application where my sqa calls are encapsulated: My API's
methods always do the same kind of stuff:
1- request
Hi,
Strange behaviour with sqa in multi-process environment... already posted
on
StackOverflowhttp://stackoverflow.com/questions/21109794/delayed-change-using-sqlalchemyfor
a web app but still missing some understanding so posting here.
I've created an application where my sqa calls are
Thanks for your comments.
I'm using sqlite in default mode (which is synchronous) and here's my engine
configuration.
engine = create_engine('sqlite:///my_db.sqlite',
connect_args={'detect_types':
sqlite3.PARSE_DECLTYPES|
()
On Monday, January 20, 2014 5:12:58 PM UTC+1, pr64 wrote:
Hi,
Strange behaviour with sqa in multi-process environment... already posted
on
StackOverflowhttp://stackoverflow.com/questions/21109794/delayed-change-using-sqlalchemyfor
a web app but still missing some understanding so posting
Hi,
Newbie question on relationships.
Consider the following code.
When deleting a child, I would like the parent *.children* attribute to be
automatically updated by the orm.
It is not : am I doing something wrong or missed some configuration ?
Thanks a lot!
Pierre
#!/usr/bin/env python
#
Hi,
Sorry for the previous post. Attached script had a typo.
When deleting a child, I would like the children list of the parent to be
automatically updated...
Am i doing something wrong or missed some configuration ?
Please note that i'm using sqa 0.8.4.
Thanks
Pierre
#!/usr/bin/env
HI everyone,
First, i would like to thank you for your comments.
Then, for those who run linux, the following works:
1- copy your db.sqlite to /dev/shm/db.sqlite (thus in ram fs)
2- play with it through sqlalchemy
3- backup it to disk when needed
src =
Hi,
I'm currently running several python applications (each app using
sqlalchemy) accessing (read/write) a single SQLite database stored on disk.
For performance reasons, I would like to store this db file in RAM memory
(ie, in my /dev/shm)
The applications would then access a shared
Hi,
In order to improve the underlying SQLite performance, I've changed some
low level settings with PRAGMA commands:
PRAGMA synchronous=NORMAL; /* instead of default FULL value, see:
http://www.sqlite.org/pragma.html#pragma_synchronous */
PRAGMA journal_mode=WAL; /*
Example code is:
orm = OrmManager()
session = orm.get_session()
my_obj = session.query()
my_obj.attribute = 'new value'
session.commit()
I can see an issue here, talking to you. We used the SingleThreadedPool
with pool_size=50. But looking at our code, it seems that we never
Hi,
For some reason, I need to access my sqlite database through an API which
encapsulates the sqlalchemy stuff.
In my api methods, the typical sequence is:
1. get a session from the session maker
2. query/commit the db using this session
3. return the queried/commited object and close
Worked perfectly. Thanks a lot for your quick answer and so great software.
Le jeudi 24 mai 2012 16:45:50 UTC+2, Michael Bayer a écrit :
On May 24, 2012, at 10:02 AM, pr64 wrote:
Hi,
For some reason, I need to access my sqlite database through an API which
encapsulates the sqlalchemy
Hi,
Using SQLAlchemy 0.7.7 with an underlying sqlite databse, we
configured the engine with poolclass=SingletonThreadPool and
pool_size=50
Our unit-tests were working fine. But when running the app, some
(ProgrammingError) Cannot work on a closed database occured.
Reading the docs and mailist
On May 23, 3:46 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On May 23, 2012, at 5:04 AM, pr64 wrote:
Hi,
Using SQLAlchemy 0.7.7 with an underlying sqlite databse, we
configured the engine with poolclass=SingletonThreadPool and
pool_size=50
Our unit-tests were working fine
We tried to switch from SingletonThreadPool (which raises errors,
sometimes) to StaticPool... we'll see what happens. The problem is
that this error is not systematically raised and it seems that it is
raised when multiple threads are accessing the db.
StaticPool can't be used for
Hi,
New with SQLalchemy, here is my problem:
My model is:
user_group_association_table = Table('user_group_association',
Base.metadata,
Column('user_id', Integer, ForeignKey('user.id')),
Column('group_id', Integer, ForeignKey('group.id'))
)
department_group_association_table =
Hi,
New with sqlalchemy, i'm trying to unittest my code:
import unittest
import os
from sqlalchemy.orm.exc import NoResultFound
import User
SQLITE_FILE = 'test.db'
class UserAddTestCase(unittest.TestCase):
def setUp(self):
... some code which create the session (removed to be
20 matches
Mail list logo