On Wed, Sep 28, 2011 at 2:15 PM, Michael Bayer mike...@zzzcomputing.comwrote:
that mapper.order_by thing is fixed in 0.7.3/0.6.9 tip.
Brilliant - thanks again for all the time you put in to SA and this group,
Simon
--
You received this message because you are subscribed to the Google Groups
On Mon, Oct 3, 2011 at 4:24 PM, Chris Withers ch...@simplistix.co.ukwrote:
On 03/10/2011 15:15, Michael Bayer wrote:
ive no idea what __main__.py is either ? where's the SQLAlchemy
exceptions here ? (keeping in mind i havent yet gone through all the steps
to download a file...untar
On Tue, Feb 21, 2012 at 3:24 PM, Manav Goel manav.goe...@gmail.com wrote:
This depends upon the execution plan of the query and is more really a
postgresql question. Google postgresql IN performance and you will get
a good idea of it.
By the look of your code, Second option would obviously be
On Mon, May 14, 2012 at 5:20 PM, Oliver Tonnhofer olt...@gmail.com wrote:
Hi,
how can I execute a statement for each new connection. I'm using the trigram
module (pg_trgm) for PostgreSQL and I need to set a threshold by calling an
SQL function for each new connection (`select
On Sun, May 27, 2012 at 4:37 PM, Julien Lacroix ne...@aradriel.de wrote:
I've stumbled across someof my old query and got certain problems to read my
bunch of where statements.
The editors word wrap function makes things just worse. whats your advance
to keep long filter statements readable,
On Mon, May 28, 2012 at 12:58 AM, Bradley Mclain
bradley.james.mcl...@gmail.com wrote:
On Saturday, May 26, 2012 9:31:55 AM UTC+10, Michael Bayer wrote:
On May 24, 2012, at 11:28 PM, Bradley Mclain wrote:
Hi,
Currently working on a project that use SQL alchemy with mod_wsgi,
webapp2 and
On Monday, August 13, 2012 9:23:43 PM UTC+2, Gery wrote:
Hello, I'm new around here and I've been using SQLalchemy (SA) for a
while. I work with PostGis (PG), OpenLayers (OL), ExtJS, GeoExtJS and now
with the great SA and GeoAlchemy. I have one problem, I created a model
where I defined one
On Tue, Aug 14, 2012 at 6:39 PM, Gery geryherb...@gmail.com wrote:
Hello Simon,
Thanks for your answer, acttually I don't use any web framework, I just did
a html page and put Openlayers, GeoExt, and Ext code there. To display
points/lines/polylines/rasters/etc., I use Mapserver, so I
On Tue, Aug 21, 2012 at 5:25 PM, andrea crotti
andrea.crott...@gmail.com wrote:
The question is probably very simple, but I can't find an answer anywhere...
Suppose I already have some tables declarad in a declarative way, as
below, how do I create the database schema from them?
I usually
On Wed, Aug 22, 2012 at 12:51 PM, David McKeone davidmcke...@gmail.com wrote:
I've been using SQLAlchemy with Flask via the Flask extension
Flask-SQLAlchemy. Everything works great so far, but I foresee a potential
problem once I start to use my database model outside of Flask. In the
future
On Wed, Aug 22, 2012 at 2:44 PM, David McKeone davidmcke...@gmail.com wrote:
On Wednesday, August 22, 2012 2:33:01 PM UTC+1, David McKeone wrote:
On Wednesday, August 22, 2012 2:23:28 PM UTC+1, Simon King wrote:
On Wed, Aug 22, 2012 at 12:51 PM, David McKeone davidm...@gmail.com
wrote
On Thu, Sep 27, 2012 at 2:34 PM, Shawn Wheatley swheat...@gmail.com wrote:
On Thursday, September 27, 2012 9:21:57 AM UTC-4, Shawn Wheatley wrote:
the most idiomatic way to handle this is to merge the objects in:
obj = session.merge(existing_object)
this will emit a SELECT for the
On Mon, Oct 1, 2012 at 11:38 PM, Gery . gameji...@hotmail.com wrote:
thanks but I want to use that live access to search at first through
ExtJS/GeoExtJS/OpenLayers and through them there is only a url available
(protocol HTTP), I also need to get the data as GeoJSON, so I think
GeoAlchemy
On Wed, Oct 3, 2012 at 5:02 PM, Trinath Somanchi
trinath.soman...@gmail.com wrote:
Hi-
I have a sql query which is returning 2 rows. But when is transformed to ORM
query, its not returning any rows.
My SQL Statement:
select distinct(inst.hostname) as server_name,
fip.address as
On Wed, Oct 3, 2012 at 5:23 PM, Trinath Somanchi
trinath.soman...@gmail.com wrote:
Hi Simon-
I have update my ORM query this way
result =
session.query(models.Instance.hostname.distinct(),models.FixedIp.address,models.VirtualInterface.address).\
On Tue, Sep 18, 2012 at 1:33 PM, Ids idsvandermo...@gmail.com wrote:
and of course sqlalchemy 0.5.1 did work. So something in sqlalchemy 0.7.8
broke...
I just hit this error myself when using the latest SQLAlchemy (both
0.7.9 and latest 'default' from hg) against MySQL 3.23.58. Adding the
On Mon, Oct 22, 2012 at 3:29 PM, Simon King si...@simonking.org.uk wrote:
On Tue, Sep 18, 2012 at 1:33 PM, Ids idsvandermo...@gmail.com wrote:
and of course sqlalchemy 0.5.1 did work. So something in sqlalchemy 0.7.8
broke...
I just hit this error myself when using the latest SQLAlchemy
On Wed, Oct 24, 2012 at 3:59 PM, Ladislav Lenart lenart...@volny.cz wrote:
Hello.
Suppose I have the following query:
def people_older_than(age):
q = session.query(Person).order_by(Person.name)
q = q.filter(Person.age age)
return q
It returns a subset of Person instances.
On 4 Jan 2013, at 03:08, James Hartley jjhart...@gmail.com wrote:
Embarrassingly, I'm gotten lost in calling SQL functions in SQLAlchemy 0.7.1.
I can boil the problem down to the following table structure:
CREATE TABLE words (
id INTEGER NOT NULL,
timestamp DATETIME NOT
On 18 Jan 2013, at 12:15, Kenny bill...@mpimp-golm.mpg.de wrote:
Hey all,
I'm quite new to SQLAlchemy and I've been struggling to get the following to
work.
When one queries with specific entities, the resulting namedTuples might have
overlapping keys.
e.g.
sample =
On Wed, Jan 23, 2013 at 11:30 AM, Jose Soares
jose.soa...@sferacarta.com wrote:
Hi all,
I'm trying to compile a query to avoid Oracle limit of 1000 in IN():
def chunks(l, n):
Yield successive n-sized chunks from l.
for i in xrange(0, len(l), n):
yield l[i:i+n]
On Wed, Feb 6, 2013 at 2:05 AM, Jonathan Vanasco jonat...@findmeon.com wrote:
I use SqlAlchemy in a Pyramid app. All my models, connections, etc
are within and set up by Pyramid.
I'm trying to do a maintenance script, and am a bit confused.
In my script, thanks to a bootstraped commandline
On Wed, Feb 6, 2013 at 11:19 AM, Simon King si...@simonking.org.uk wrote:
On Wed, Feb 6, 2013 at 2:05 AM, Jonathan Vanasco jonat...@findmeon.com
wrote:
I use SqlAlchemy in a Pyramid app. All my models, connections, etc
are within and set up by Pyramid.
I'm trying to do a maintenance script
On Tue, Feb 12, 2013 at 10:12 AM, shaung shaun.g...@gmail.com wrote:
For the following code:
from sqlalchemy import create_engine, MetaData, Table
dbengine = create_engine('mssql+pyodbc://MYDSN')
dbmeta = MetaData()
dbmeta.bind = dbengine
def get_table(name):
table = DBTable(name,
On Tue, Feb 12, 2013 at 11:29 AM, shaung shaun.g...@gmail.com wrote:
On Tuesday, February 12, 2013 7:18:37 PM UTC+9, Simon King wrote:
If you add echo='debug' to your create_engine call, SA will log all
calls to the database and rows returned, which might give you an idea
of where all
On 21 Feb 2013, at 22:44, Victor Ng vicng...@gmail.com wrote:
On Thursday, February 21, 2013 1:03:49 PM UTC-8, A.M. wrote:
On Thu, 21 Feb 2013 12:52:42 -0800 (PST), Victor Ng vicn...@gmail.com
wrote:
I do a lot of processing on large amount of data.
The common pattern we follow is:
On Fri, Feb 22, 2013 at 1:31 AM, Jonathan Vanasco jonat...@findmeon.com wrote:
basd on a bunch of error messages, this example works...
criteria = ( ('male',35),('female','35) )
query = session.query( model.Useraccount )
ands = []
for set_ in criteria :
On Tue, Feb 26, 2013 at 2:44 PM, dalia dalia@gmail.com wrote:
Hi,
My intention is - to store .xls, .doc and .pdf files (with images in them)
to store in a Oracle database and retrieve them. I'm using SQLAlchemy
declarative code. The problem is, the data gets stored in the database but
This is an unusual way to update an object that you've already retrieved:
result = session.query(Executions). \
filter_by(id=execution_id).first()
if result.end_date is None:
e =
update(Executions).where(Executions.id==bindparam(execution_id)). \
I don't understand your model. Can you have multiple rows in the
Exchange table which all have the same value for Exchange.exchange?
If so, and if you want PhoneNumber to be able to point to a single one
of those rows, then it needs 2 columns to do that (one to point to
Exchange.exchange and one
)),
Column(files_id, Integer, ForeignKey(files.id))
)
The error:
AttributeError: 'Table' object has no attribute 'process_id'
Why can not I access process_id?
2013/3/7 Simon King si...@simonking.org.uk
The ORM tutorial covers querying with joins:
http
You have to put your ForeignKeyConstraint in the __table_args__ for the
PhoneNumber class - see
http://docs.sqlalchemy.org/en/rel_0_8/orm/extensions/declarative.html#table-configuration
for details. Something like:
class PhoneNumber(db.Model):
__tablename__ = 'phonenumbers'
(I'm
guessing?). Is there a way to force this to execute in a specific order?
-Randall
On Thu, Mar 7, 2013 at 4:06 PM, Simon King si...@simonking.org.uk wrote:
You have to put your ForeignKeyConstraint in the __table_args__ for the
PhoneNumber class - see
http://docs.sqlalchemy.org/en
On Wed, Mar 13, 2013 at 4:00 PM, junepeach juneyh...@gmail.com wrote:
Hello All,
Using sqlalchemy ORM, I have no problem to create a database in mysql
locally. If I have mysql installed in a different machine (ip address:
10.7.0.127), and my tables defined in this machine (10.7.0.121). Now
On 21 Mar 2013, at 20:56, Jose Neto jbastosn...@gmail.com wrote:
Given the following statement:
p =
db.query(Profile).options(joinedload('*')).filter_by(id=p.id).limit(1).one()
I will get a subquery + a join, instead of a pure join:
SELECT [...]
FROM (SELECT profile.id AS
On Wed, Mar 27, 2013 at 4:13 PM, Kevin S kevinrst...@gmail.com wrote:
Setup: I have been learning SQL Alchemy to build a prototype (proof of
concept) Flask app for our internal website. We want to replace our current
site, which is made entirely of slow python CGIs and raw SQL. Our database
On Mon, Apr 15, 2013 at 3:39 AM, James Hartley jjhart...@gmail.com wrote:
On Thu, Apr 4, 2013 at 1:39 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
the requery is due to the default expire_on_commit of session.commit():
http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#committing.
On Wed, Apr 17, 2013 at 2:38 AM, Evan Jon evanjon@gmail.com wrote:
Hello all,
I want to map a table whose name is BAND_ORDER_OF_LOCAL_TESTING.
class BandOrderOfLocalTesting(Base):
__TABLENAME__ = 'BAND_ORDER_OF_LOCAL_TESTING'
order_id = Column(order_id, Number(18),
On Wed, Apr 17, 2013 at 2:59 PM, James Hartley jjhart...@gmail.com wrote:
On Wed, Apr 17, 2013 at 6:20 AM, Lele Gaifax l...@metapensiero.it wrote:
James Hartley jjhart...@gmail.com writes:
Is it possible to map Table instances back to classes defined through
declarative_base()?
...I
On Tue, Apr 23, 2013 at 6:54 AM, Paradox para...@pobox.com wrote:
I have a question related to sqlalchemy and testing, not sure if this is the
best place to ask so let me know if I am asking here in error.
I am trying to learn to write and run tests using py.test. Currently I am
working on a
On Tue, Apr 23, 2013 at 2:08 PM, Paradox para...@pobox.com wrote:
On 04/23/2013 04:31 PM, Simon King wrote:
On Tue, Apr 23, 2013 at 6:54 AM, Paradox para...@pobox.com wrote:
I have a question related to sqlalchemy and testing, not sure if this is
the
best place to ask so let me know if I
On Thu, May 2, 2013 at 11:43 PM, Paradox para...@pobox.com wrote:
I am trying to ensure that my table doesn't allow duplicate rows.
The table is defined (in SqlAlchemy 0.8):
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
lname =
On Thu, May 9, 2013 at 9:02 AM, Treeve Jelbert tre...@scarlet.be wrote:
i have started having problems when casting spells.
I get message:
The tablet version cache is damaged, removing it!
In some cases it appears multiple times.
I tried 'cleanse --tablet' but it makes no difference.
Any
On 16 May 2013, at 21:21, Michael Bayer mike...@zzzcomputing.com wrote:
On May 16, 2013, at 4:07 PM, Julien Cigar jci...@ulb.ac.be wrote:
On 05/14/2013 16:58, Michael Bayer wrote:
When you are storing data with key/values, where the set of keys is part of
the data. Storing
On Tue, May 21, 2013 at 4:31 PM, Etienne Rouxel
rouxel.etie...@gmail.com wrote:
Hello
In my program, I was trying to guess why so many SQL queries were sent while
some could have been avoided with the help of the identity map.
So, I reduced my program to what is below and wrote 3 times the
I think turbogears is loading your sqlalchemy parameters from a config
file (dev.cfg perhaps?). You should look for a line of the form
sqlalchemy.max_overflow = X and delete it.
Hope that helps,
Simon
On Tue, May 28, 2013 at 10:34 AM, jo jose.soa...@sferacarta.com wrote:
Thanks for the tip,
On Fri, May 31, 2013 at 10:28 AM, sajuptpm sajup...@gmail.com wrote:
How to update PickleType column using DBSession.execute()
class MyTable(DeclarativeBase):
__tablename__ = 'mytable'
context = Column(PickleType)
Attempt 1
context = {k1:{n1:bbla}, k2:{n2:bbla}}
On Thu, Jun 27, 2013 at 11:01 AM, Burak Arslan
burak.ars...@arskom.com.tr wrote:
Hi,
First, some background:
psql (9.2.4)
Type help for help.
somedb=# create table a(a varchar(5));
CREATE TABLE
somedb=# insert into a values (E'\\');
INSERT 0 1
somedb=# select * from a where a = '\';
On Fri, Jun 28, 2013 at 2:11 AM, Burak Arslan
burak.ars...@arskom.com.tr wrote:
On 06/27/13 13:41, Simon King wrote:
Remember that Python also has its own string escaping. When you write
a literal '\\' in Python, you are creating a string containing a
single backslash.
Hi Simon,
I'm aware
On Fri, Jun 28, 2013 at 11:05 AM, Burak Arslan
burak.ars...@arskom.com.tr wrote:
On 06/28/13 11:55, Simon King wrote:
When you write this:
e.execute(t.select(t.c.a.like('\\')))
...the pattern that you are sending to SA is a single backslash, and
SA is forwarding that directly to PG. What do
On Thu, Jul 11, 2013 at 4:30 PM, Richard Gomes rgomes.i...@gmail.com wrote:
hello,
I've previously defined inserts and updates by hand in my application, which
is working fine, not using SQLAlchemy at the moment.
At this point, I'd like to employ SQLAlchemy to generate these inserts and
On Tue, Jul 23, 2013 at 8:17 AM, Matthew Pounsett
matt.pouns...@gmail.com wrote:
Does the ORM allow for filtering by a variable attribute name? I found this
discussion using raw SQL:
https://groups.google.com/d/topic/sqlalchemy/Axa-0thwOR8/discussion
But the suggestion doesn't seem to apply
It's a horrible hack, but did you know that you can change the class
of an instance by assigning to its __class__ attribute? I've no idea
if SA does anything that would stop this from working, but you could
try it. Start by creating a subclass of Table with your extra methods,
then iterate over
On 10 Aug 2013, at 03:42, csdr...@gmail.com wrote:
This is driving me a little crazy so hopefully someone here can help. This is
my first time working with sqlalchemy (v0.8). Python is v2.7.2 and MySQL is
v14.14.
The (heavily) summarized code is as follows:
class Price(Base):
On Tue, Aug 13, 2013 at 2:07 PM, till.plewe till.pl...@gmail.com wrote:
I am using python 3.3 and sqlalchemy 0.8.2
I am trying to define a self-referential many-to-many relationship for a
class where the primary key is provided by a mixin. Defining the primary
directly in the class works.
I think you may be confused about the relationship properties you have
here. As far as I can tell, a Creator can have many companies, but
each Company has only one creator, correct? So Company.creator should
only ever be an instance of Creator (or None), whereas
Creator.companies should be a list.
, August 14, 2013 6:18:51 AM UTC-4, Simon King wrote:
I think you may be confused about the relationship properties you have
here. As far as I can tell, a Creator can have many companies, but
each Company has only one creator, correct? So Company.creator should
only ever be an instance
On 26 Aug 2013, at 19:15, lars van gemerden l...@rational-it.com wrote:
On Monday, August 26, 2013 5:23:07 PM UTC+2, Michael Bayer wrote:
On Aug 26, 2013, at 11:14 AM, lars van gemerden la...@rational-it.com wrote:
Hi all,
This might be a bit of a stretch but here it goes:
Say that
On Tue, Aug 27, 2013 at 1:40 PM, herzaso herz...@gmail.com wrote:
I have a model with an ID column set as the primary key, though i'd like to
be able to identify records by 3 other columns.
For this situation, I've added a classmethod that will fetch the record if
found or a new record if not.
On Mon, Aug 26, 2013 at 11:17 PM, Mohsen Pahlevanzadeh
m.pahlevanza...@gmail.com wrote:
Dear all,
i have the following delete record function:
def deleteRecord(self,tableObj):
self.session.delete(tableObj);
self.session.commit();
When i call the abobe function,
On Tue, Aug 27, 2013 at 2:31 PM, herzaso herz...@gmail.com wrote:
On Tuesday, August 27, 2013 3:55:50 PM UTC+3, Simon King wrote:
On Tue, Aug 27, 2013 at 1:40 PM, herzaso her...@gmail.com wrote:
I have a model with an ID column set as the primary key, though i'd like
to
be able
session.delete() only works with instances which are already part of that
session. Here's an example:
ddd = session.query(SellersTable).filter_by(name_type=1).one()
session.delete(ddd)
This will SELECT the row from the database first, then perform the DELETE using
the object's primary key.
On Thu, Aug 29, 2013 at 3:54 PM, Aaron Krister Johnson
akjmi...@gmail.com wrote:
Hi all,
I have a script that bulk copies relevant data from one database server to
another using the neat-o MetaData features in SQLAlchemy.
My script is a custom variation of this script:
On Thu, Aug 29, 2013 at 4:48 PM, diverman pa...@schon.cz wrote:
Hi,
we observed deadlock-like problem on our multi-component system with mysql
database.
Our setup:
1) MySQL server 5.5 with many MyISAM tables Foo_timestamp, one per day
(like partitioning)
2) C++ backend daemon
*
On Thu, Aug 29, 2013 at 5:20 PM, Simon King si...@simonking.org.uk wrote:
On Thu, Aug 29, 2013 at 4:48 PM, diverman pa...@schon.cz wrote:
Hi,
we observed deadlock-like problem on our multi-component system with mysql
database.
Our setup:
1) MySQL server 5.5 with many MyISAM tables
On Thu, Aug 29, 2013 at 6:01 PM, diverman pa...@schon.cz wrote:
Dne čtvrtek, 29. srpna 2013 18:23:12 UTC+2 Simon King napsal(a):
On Thu, Aug 29, 2013 at 5:20 PM, Simon King si...@simonking.org.uk
wrote:
On Thu, Aug 29, 2013 at 4:48 PM, diverman pa...@schon.cz wrote:
Hi,
we observed
On Fri, Aug 30, 2013 at 9:10 AM, Дмитрий Косолапов
kosolapo...@gmail.com wrote:
my program code:
engine = create_engine(connect_str, echo=True)
Session = sessionmaker(bind=engine)
for bar in default_session.query(BarLog)[:3]:
conf = ManagerConfig(indicator_config='',
On 1 Sep 2013, at 18:27, Mohsen Pahlevanzadeh m.pahlevanza...@gmail.com wrote:
Dear all,
Before apply code or writing code from a documentation, At first i test it
into test.py,
Now ,I read the following doc:
conjuctions in sqlalchemy
I supposed users a class such as tables class:
On 1 Sep 2013, at 22:30, Mohsen Pahlevanzadeh m.pahlevanza...@gmail.com wrote:
Dear all,
i get the following traceback for session.query().filter(sellers.c.name ==
'golrang').delete('sellers') line:
///
Traceback (most recent call last):
File
this problem before I move on ...
On Tuesday, August 27, 2013 5:24:07 PM UTC+3, Simon King wrote:
On Tue, Aug 27, 2013 at 2:31 PM, herzaso her...@gmail.com wrote:
On Tuesday, August 27, 2013 3:55:50 PM UTC+3, Simon King wrote:
On Tue, Aug 27, 2013 at 1:40 PM, herzaso her...@gmail.com wrote:
I
connection
Regarding your second remark, the answer is yes, the error was due to the
unique constraint on those columns
BTW: I'm working on MySQL
On Monday, September 2, 2013 1:31:12 PM UTC+3, Simon King wrote:
I don't really know the answer, but I'd be interested in the results
have it set as REPEATABLE READ.
However, I don't use transactions in sqlalchemy
On Monday, September 2, 2013 3:08:58 PM UTC+3, Simon King wrote:
Do you know what transaction isolation level you are running at? The
default apparently is REPEATABLE READ:
http://dev.mysql.com/doc/refman/5.6/en
replace the transaction isolation
level?
On Monday, September 2, 2013 3:29:25 PM UTC+3, Simon King wrote:
What exactly do you mean by not using transactions? The Session always
works within a transaction:
http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#managing-transactions
I
it a try with a session.close to see if it helps (although I
think I had complaints from users running the same API several times - and
each time, at the end of my REST APIs I run session.close)
On Monday, September 2, 2013 3:58:02 PM UTC+3, Simon King wrote:
I'm no expert on isolation levels - I
On Mon, Sep 2, 2013 at 4:01 PM, lars van gemerden l...@rational-it.com wrote:
Hi all,
I have a one-to-one and many-to-one relationship (with an association table
in the middle; Report.author-assoctable-Person.reports; why the table in the
middle, you might ask, well it's a long story) and i
-it.com
+31 6 26 88 55 39
On 2 sep. 2013, at 17:39, Simon King si...@simonking.org.uk wrote:
On Mon, Sep 2, 2013 at 4:01 PM, lars van gemerden l...@rational-it.com
wrote:
Hi all,
I have a one-to-one and many-to-one relationship (with an association
session, i'd have to check. What actually happens if you add the same
instance to a second session?
CL
On Mon, Sep 2, 2013 at 8:23 PM, Simon King si...@simonking.org.uk wrote:
Without knowing your application it's very difficult to know...
Is there any chance that the second object
way, but it might pop up again. I'll keep
merge in mind (i've run into the is already attached to session before).
Thank you, Lars
On Monday, September 2, 2013 9:18:11 PM UTC+2, Simon King wrote:
Dunno, let's try it:
import sqlalchemy as sa
import sqlalchemy.orm as saorm
from
with this issue... not only do I feel helpless, I don't
have any clue on how to get around it ...
What if I make the change without the session? Would the session pick up
the changes on its first query?
On Monday, September 2, 2013 3:58:02 PM UTC+3, Simon King wrote:
I'm no expert on isolation
logged-in
users) what are the odds that the same user will get the same error 10
times?
On 3 Sep, 2013 3:05 PM, Simon King si...@simonking.org.uk wrote:
Race conditions can happen at any time, not just when the system is
under heavy load. You only need 2 requests to arrive at approximately
-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On
Behalf Of Simon King
Sent: Tuesday, September 03, 2013 3:28 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Occasional IntegrityError when identifying model
not by its ID
OK, I agree that doesn't sound like
On Wed, Sep 4, 2013 at 12:05 PM, lars van gemerden l...@rational-it.com wrote:
I think i must be reading over something, but:
is there a way to delay the selection of attributes in a query; something
like
session.query(Person).filter(Person.age
100).select(Person.name).first()
at the beginning of each request will do the job?
Thanks,
Ofir
On Tuesday, September 3, 2013 3:54:16 PM UTC+3, Simon King wrote:
I don't honestly know, but if this were my project I would be trying
very hard to ensure that both (session.commit or session.rollback)
followed by session.close were
thoughts? Can you make sense of this issue being related to certain
computers?
Thanks,
Ofir
On Thursday, September 5, 2013 1:13:49 PM UTC+3, Simon King wrote:
(Remember, I still know next to nothing about Tornado, so this is pure
assumption on my part)
By default, SQLAlchemy scoped
On 8 Sep 2013, at 02:36, Mohsen Pahlevanzadeh m.pahlevanza...@gmail.com wrote:
Suppose i need to send a set of table field and a value to search, i found
the following code:
///
q = session.query(myClass)
for attr, value in web_dict.items():
q
=
On 20 Sep 2013, at 08:15, monosij.for...@gmail.com wrote:
I am trying to create multiple tables from a set of 'create table'
scripts.The set of scripts are in a list and I am executing as below.
The scripts create tables, all scripts tested and work through the sqlite3
driver fine -
(statement, parameters)
sqlite3.Warning: You can only execute one statement at a time.
...
Hope this helps.
Please let me know if you need anything else.
Thank you again for all your help.
Mono
On Friday, September 20, 2013 7:07:57 PM UTC-4, Simon King wrote:
On 20 Sep 2013, at 08
, September 22, 2013 5:30:37 PM UTC-4, Simon King wrote:
The documentation for the Python sqlite driver specifically says:
execute() will only execute a single SQL statement. If you try to execute
more than one statement with it, it will raise a Warning. Use
executescript() if you want to execute
On Thu, Sep 26, 2013 at 11:09 AM, mew...@gmail.com wrote:
windows 7 64bit, flask, sqlalchemy 0.8.2, postgresql latest
Traceback (most recent call last):
File E:/code/python/sqlalchemy-test/sql-test.py, line 30, in module
db.session.add(admin)
File
On Fri, Oct 4, 2013 at 3:47 PM, Russell Holloway
russ.d.hollo...@gmail.com wrote:
Hello all,
I am trying to migrate some custom ORM code to use SQLAlchemy instead for
database interactions. I'm having some issues with proper session
management. The main issue that seems to occur is the
I'm not sure that will work on it's own, will it? When used in a class
context (Plan.calculated_date), you will end up calling the date
function with 3 SQLAlchemy column objects, which won't work.
At a minimum, you'd need this:
class Plan(Base):
@hybrid_property
def
On Thu, Oct 31, 2013 at 11:20 AM, Sayth Renshaw flebber.c...@gmail.com wrote:
Hi
Looking for some guidance using SQLAlchemy. In particular using SQLAlchemy
to parse an XML file to the database.
I have read the docs in SQLAlchemy on creating database and classes and
tables and then started
On Wed, Nov 6, 2013 at 3:28 AM, bsa bruc...@gmail.com wrote:
After resisting ORM and database abstraction packages for a long time in
favour of plain sqlite3, I decided to give SQLAlchemy's ORM features a try.
I've managed to specify a schema and get objects in and out of tables. I'm
not sure
On Wed, Nov 6, 2013 at 11:48 AM, Victor Varvariuc
victor.varvar...@gmail.com wrote:
How can this be? Is this the intended behavior?
ipdb customer = factory.new_customer(_with_id=True)
ipdb with Session() as session: customer = session.merge(customer)
ipdb customer
Customer(id=10002,
On Thu, Nov 14, 2013 at 8:47 AM, jonas geiregat geiregatjo...@gmail.com wrote:
I have a table called session which has foreign key constraints. I removed
them and auto generated a migration script. The upgrade function is
populated as expected but the downgrade function isn't. I searched
On 15 Nov 2013, at 17:00, John Kida jdk...@gmail.com wrote:
Hi guys, i dont really think this is sqlalchemy issue, but thought someone
might be able to tell me why.
I have a large list of id values, over 100,000 that are given to me from a
text file.. Now I need to pull all rows that
On 16 Nov 2013, at 00:23, Tim Pierson tim.pier...@gmail.com wrote:
Happy Friday night everyone.
Maybe there's an easy way to deal with this:
How can I use the SQLSoup insert function to update columns whose names
contain whitespace?
ie: db.table.insert(XML Schema Version=None)
Are
On Fri, Nov 29, 2013 at 1:55 PM, Glenn Wilkinson
glenn.wilkin...@gmail.com wrote:
Hi all,
I'm struggling to get a join to work, as below:
[...]
#Table definitions
table = Table('vends', MetaData(),
Column('mac', String(64), primary_key=True),
Ah, OK, I see what you mean. The way that you are producing the JOIN,
although it works, is probably not exactly what you wanted. With this:
s=select([proxs.c.mac]).outerjoin(vends, proxs.c.mac == vends.c.mac)
...you are first creating a query that selects from the proxs table,
then treating
On Wed, Jan 8, 2014 at 3:37 PM, Mark S dbs...@gmail.com wrote:
Hi
I can successfully use pagination with the following -
mydata=Article.query.filter(Article.author_id==User.id).filter(User.id==g.user.id).paginate(page,
POSTS_PER_PAGE, False)
However, I need to fetch columns from multiple
1 - 100 of 655 matches
Mail list logo