, Mariano Mara wrote:
2014-12-11 13:35 GMT-03:00 dewey de...@pathoz.com:
I'm importing lots of text files, using csv.dictReader
I then create model instances and store the recs in the DB
One row from the csv file might represent a child-row, plus 4-5 parents
(using get_or_create
2014-12-11 17:28 GMT-03:00 dewey de...@pathoz.com:
Oh doh...that is perfect!!!
Except for now, I either need to merge my __mapper_args__ from each table
to my base __mapper_args__
Or is there a way to add to __mapper_args__ in the base DYNAMICALLY based
on some property in the class?
That
Hi there. I have some code that works ok in PG and now I need to make it
work with Oracle, however I am hitting this error with NVARCHAR and I am
not sure how to handle it.
First a small code in order you can reproduce it (as you can see name has
been defined as UnicodeText):
from sqlalchemy
Sorry, I meant NCLOB, not NVARCHAR.
2014-09-30 16:57 GMT-03:00 Mariano Mara mariano.m...@gmail.com:
Hi there. I have some code that works ok in PG and now I need to make it
work with Oracle, however I am hitting this error with NVARCHAR and I am
not sure how to handle it.
First a small code
:06 GMT-03:00 Mariano Mara mariano.m...@gmail.com:
Sorry, I meant NCLOB, not NVARCHAR.
2014-09-30 16:57 GMT-03:00 Mariano Mara mariano.m...@gmail.com:
Hi there. I have some code that works ok in PG and now I need to make it
work with Oracle, however I am hitting this error with NVARCHAR and I
Hi all
Each time my Parent class is edited and one of the elements from its Child
relationship is removed I want to invalidate this element (e.g.
element.valid=False) instead of actually performing the delete DML
instruction. How can I achieve that?
I have created a remove event listener and I
2014-07-15 14:47 GMT-03:00 Michael Bayer mike...@zzzcomputing.com:
On Jul 15, 2014, at 1:27 PM, Mariano Mara mariano.m...@gmail.com wrote:
Hi all
Each time my Parent class is edited and one of the elements from its
Child relationship is removed I want to invalidate this element (e.g
Hi everyone, I am hitting an error while defining a relationship with a
parent table with a composite primary key (my child class has two
attributes that point to the same parent class -with a composite pk- but
both relationships are properly defined with the 'foreign_keys'
parameter): I am
On 19/02/14 15:28, Michael Bayer wrote:
On Feb 19, 2014, at 1:14 PM, Mariano Mara mariano.m...@gmail.com wrote:
# relationships
runner = relationship(User, foreign_keys=[uid, oid],
#primaryjoin=and_(Bet.uid==User.uid,
Bet.oid==User.oid
On 19/02/14 16:01, Michael Bayer wrote:
On Feb 19, 2014, at 1:34 PM, Mariano Mara mariano.m...@gmail.com wrote:
On 19/02/14 15:28, Michael Bayer wrote:
On Feb 19, 2014, at 1:14 PM, Mariano Mara mariano.m...@gmail.com wrote:
# relationships
runner = relationship(User
Hi there, in one application I am using sqlalchemy 0.7.8 against Oracle
11 release 1 and I am hitting Oracle's lost contact more times than I
would like to. Since the app seems unable to recover from the error, I
have to restart it completely (it is a pyramid app).
According to this
.
thanks so much for your quick answer. I will review this option and
evaluate if I can use it.
On Dec 5, 2013, at 11:05 AM, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 5, 2013, at 10:54 AM, Mariano Mara mariano.m...@gmail.com wrote:
Hi there, in one application I am using
On 16/09/13 11:49, Chris Withers wrote:
Hi All,
I know I asked this before, but I can't find the answer...
How would I get SQLALchemy to generate these:
http://www.postgresql.org/docs/9.2/static/queries-with.html
cheers,
Chris
look here:
On 06/04/2013 11:22 PM, Warwick Prince wrote:
On 06/04/2013 10:46 PM, Michael Bayer wrote:
There's a long standing ticket to add support for comments, at least at the DDL
level. I don't think anyone has looked into what level of support we get from
the various backends as far as
On 06/04/2013 10:46 PM, Michael Bayer wrote:
There's a long standing ticket to add support for comments, at least at the DDL
level. I don't think anyone has looked into what level of support we get from
the various backends as far as reflection.
So its something the library has room for,
On 05/23/2013 04:42 AM, jo wrote:
|Hi all,
I wondered if it is possible to execute a partial distinct in sqlalchemy.
The following query works in oracle and postgresql:
select distinct col1, first_value(col2) over (partition by col1 order by
col2 asc)
from tmp;
How can I do such query in
On 05/23/2013 09:06 PM, Mike Bissell wrote:
How might I convince SQLAlchemy 0.7.9 to create a newly added index on a table
in the event that the index doesn't already exist? This new index is created as
a member of __table_args__; it is not instantiated with index=True. I have many
such
to do so, I will surely
appreciate it.
Mariano
On 04/25/2013 11:08 AM, Mariano Mara wrote:
On 04/25/2013 10:22 AM, Richard Gerd Kuesters wrote:
Hi all,
I've been playing with sqla_hierarchy from
https://github.com/marplatense/sqla_hierarchy .
That code of that sqla_hierarchy was written
On 04/25/2013 10:22 AM, Richard Gerd Kuesters wrote:
Hi all,
I've been playing with sqla_hierarchy from
https://github.com/marplatense/sqla_hierarchy .
That code of that sqla_hierarchy was written to provide a limited
support for cte, from the time when sqalchemy didn't have cte.
Since
On 05.01.12 16:13, Michael Bayer wrote:
On Jan 5, 2012, at 3:03 PM, Mariano Mara wrote:
Hi there! I have a master-detail entity. Since I do some post-processing
work
on the details before inserting the entity in the db, I added an
'after_insert' event where I do the extra stuff
Hi there! I have a master-detail entity. Since I do some post-processing work
on the details before inserting the entity in the db, I added an
'after_insert' event where I do the extra stuff.
One of the things I need is to make sure certain details have been
selected by the user and in case he
Hi all,
the subject pretty much explains it all. Here's a complete example of the
issue. Any tips will be appreciate.
Regards,
Mariano
Python 2.7.2 (default, Oct 14 2011, 23:34:02)
[GCC 4.5.2] on linux2
Type help, copyright, credits or license for more information.
import sqlalchemy
On Oct 21, 2011, at 7:10 PM, Mariano Mara wrote:
Hi all,
the subject pretty much explains it all. Here's a complete example of the
issue. Any tips will be appreciate.
Regards,
Mariano
Python 2.7.2 (default, Oct 14 2011, 23:34:02)
[GCC 4.5.2] on linux2
Type help, copyright
On 12.08.11 09:41, Eduardo wrote:
Dear All,
I have a list of elements for which I need to establish if they are in
a tadabase. I can make for each element a separate query but I am
afraid that that is not the best approach what is the best practice in
this case?
Thanks
Depending on the
Hi.
I'm trying to relate two tables with a one to many relationship (the
parent table has a composite primary key) but I'm getting a mapper
error. I found a recent message about this same problem but with
declarative base (which I don't use) and not sure why the suggestion
there didn't apply to
. If
'secondary' is
present, 'secondaryjoin' is needed as well.
If I leave the primaryjoin I still get the same error as reported.
TIA for any extra ideas you can suggest to fix this.
Mariano
On Nov 30, 2010, at 10:22 AM, Mariano Mara wrote:
Hi.
I'm trying to relate two tables with a one
RegEventWho(object):
pass
mapper(RegEvent, regevent, properties={
'who': relationship(RegEventWho)
})
mapper(RegEventWho, regevent_who)
print Session().query(RegEvent).join(RegEvent.who)
On Nov 30, 2010, at 12:22 PM, Mariano Mara wrote:
Excerpts from Michael Bayer's message of Tue
Hi.
I have some (very simple) tables defined in my model, such as
extensions = Table('ast_user_extension', metadata,
Column(id, Integer, autoincrement=True,
primary_key=True),
Column(extension, Unicode(20), nullable=False),
Hi there,
I have these two tables (with very long column names and most of them
with the same names in both tables) I want to join. Since I will be
processing the results afterwards, I would like to have shorten names
to type less and clearly differentiated names to avoid conflicts.
So I pass the
Excerpts from zende's message of Thu Jul 08 13:27:27 -0300 2010:
I reproduced the issue the script below:
http://gist.github.com/468199
Sorry for the weak explanation before. This has little to do with
being in tests except that's the only code that drops and creates
the db for any reason.
Excerpts from zende's message of Thu Jul 08 14:01:32 -0300 2010:
Mariano, What db? postgres?
On Jul 8, 9:41 am, Mariano Mara mariano.m...@gmail.com wrote:
I'm on a similar situation. For lack of time I couldn't investigate it
yet but I have a drop_all when running nosetests in my pylons
Excerpts from Ergo's message of Sun Jun 27 14:11:58 -0300 2010:
Hello,
I'm looking for a way to execute a recursive query and get ORM
instances with it.
http://www.postgresql.org/docs/8.4/interactive/queries-with.html
I know we don't have any direct support for recursive syntax in SA,
Hi everyone. I have been working in a little class that brings support
for with recursive idiom in my project. Actually the part it supports
for the moment are the necessary bits to generate hierarchical data (I
thought somebody might find it useful too so I added it as a recipe in
the wiki[1]).
Excerpts from Michael Bayer's message of Wed May 26 13:23:01 -0300 2010:
On May 26, 2010, at 11:47 AM, Mariano Mara wrote:
Hi everyone. I have been working in a little class that brings support
for with recursive idiom in my project. Actually the part it supports
for the moment
Excerpts from dhanil anupurath's message of Tue Apr 27 07:22:45 -0300 2010:
I am using Sqlalchemy with Oracle backend in my project.
I am running into listener issues with the Oracle database.
Here are the steps that I am following:
1. My connection string.
Excerpts from jo's message of Fri Apr 23 03:16:21 -0300 2010:
Hi all,
I need to insert a new row and get back the last inserted id,
I have some difficulty using the flush(), then I'm trying with commit() but
I can't understand how commit() works in 0.6.
In the following script I try to
Excerpts from Chris Withers's message of Thu Apr 15 11:46:05 -0300 2010:
Michael Bayer wrote:
you have to rewrite your SQL to support the number of values in the IN
clause for each parameter set.
Hmm :'(
While my code knows the number of values, they don't, and it may vary
from when
Excerpts from jo's message of Tue Mar 30 03:25:18 -0300 2010:
Hi all,
I have some troubles creating my db schema with Oracle. The problem is
on this column:
Column('cod_caratteristica_rischio', Unicode(10), index=True,
nullable=False)
It works fine in PostgreSQL but when I try it on
Excerpts from Bryan's message of Tue Mar 30 11:27:57 -0300 2010:
The underlying column returns a Decimal object when queried regularly,
and when summed as follows:
select([ mytable.c.hours ])
Decimal(1.0)
select([ func.sum(mytable.c.hours) ])
Decimal(1.0)
...but when I sum it w/ an if
Excerpts from Richard de Koning's message of Thu Mar 25 15:50:45 -0300 2010:
I've done some troubleshooting and these are my preliminary
conclusions.
A ssh-tunnel is used to reach the remote MySQL database server that
only runs on 127.0.0.1 (localhost).
Commands sent to 127.0.0.1 port 3307
Excerpts from gsandorx's message of Tue Dec 22 16:03:44 -0300 2009:
Hi Mariano, I tried your code and it worked great. Now I have to look
a way of linking the union query with a mapper to obtain a rather
elaborate object than a raw tuple, I mean, when you execute:
q =
Excerpts from Tefnet Developers - Tomasz Jezierski's message of Tue Dec 01
19:06:31 -0300 2009:
Dnia 2009-12-01, Wt o godzinie 18:45 +0100, Alexandre Conrad pisze:
Hey there,
just wondering:
easy_install SQLAlchemy
downloads and installs version 0.5.2. Shouldn't it be 0.5.6?
Excerpts from Mike Conley's message of Sat Nov 21 03:36:07 -0300 2009:
On Fri, Nov 20, 2009 at 5:14 PM, Mariano Mara mariano.m...@gmail.comwrote:
... or, at least, is weird for me :)
Hi everyone. I'm running a pylons controller
with the following instruction:
meta.Session.query
... or, at least, is weird for me :)
Hi everyone. I'm running a pylons controller
with the following instruction:
meta.Session.query(ESMagicNumber).filter(
ESMagicNumber.uuid==request.params['uuid_']).\
update({'last_access':datetime.datetime.now()})
but I'm
Hi everyone,
how do I use two clauses in an outerjoin?
e.g.: select ... from t1 outer join t2 on (t1.c1=t2.c1 and
t1.c2t2.c2)
According to docs, outerjoin is
outerjoin(left, right, onclause=None)
so I don't really know where to place the second clause.
In a query object, outerjoin is
45 matches
Mail list logo