On Wednesday, October 3, 2018 at 9:40:37 AM UTC-4, Mike Bayer wrote:
>
>
> those are not going to change within 1.2 or 1.3 but it's not ideal to
> be relying on them. For query._entities, you can use the public
> accessor query.column_descriptions. for _with_options I'm not sure
> what it
On Tue, Oct 2, 2018 at 4:44 PM Jonathan Vanasco wrote:
>
> And a quick followup to Michael:
>
> I didn't want to pollute the comments in
> https://bitbucket.org/zzzeek/sqlalchemy/issues/3225/query-heuristic-inspection-system
> as there may not have been any substantial changes and I'm just
And a quick followup to Michael:
I didn't want to pollute the comments
in
https://bitbucket.org/zzzeek/sqlalchemy/issues/3225/query-heuristic-inspection-system
as there may not have been any substantial changes and I'm just reviewing
my old notes wrong...
How long do you think it is safe to
Sorry for the messed up word wrap. I find this Google Groups web editor
hard to use.
On Wednesday, August 22, 2018 at 6:03:07 PM UTC+8, Carson Ip wrote:
>
> This is my first post here.
>
> Software / Library versions: (tho unrelated)
> sqlalchemy version: 1.0.19
> db: MySQL 5.6
> db driver:
Thank you very much Mike!
The behavior I am getting is very strange.
The test case (I posted and then removed by accident) validates the
behavior of "append to list". IOW: position is correct and not None.
105 def test_backref_set(self):
106 self._setup(ordering_list('position'))
The mechanism of backrefs is such that when you assign to the
many-to-one side of the relationship, if the one-to-many is not loaded
from the database, the "append" that you want to do does not occur at
that time. When the list is not loaded, the object is placed in a queue
where it will be
There seems to be something else ...
The following test passes which indicates that position is set as 0 right
after the bullet and the slide are related:
93 def test_backref_set(self):
94 self._setup(ordering_list('position'))
95
96 #session = create_session()
97
>
> The test below (test/ext/test_orderinglist.py) demonstrates the behavior:
>
93 def test_backref_set(self):
94 self._setup(ordering_list('position', count_from=0,
95 reorder_on_append=True))
96
97 s1 = Slide('Slide #1')
98
On Thursday, February 25, 2016 at 5:05:25 AM UTC-5, Simon King wrote:
> I think it's a matter of personal preference. Some people like to see all
> the attributes of a class defined as part of the class definition itself,
> in which case they'll need to use 2 relationship definitions with
Thanks!
This is exactly what I was looking for.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group,
On Thu, Feb 25, 2016 at 7:53 AM, 尤立宇 wrote:
> Thanks for your response.
>
> Do you consider using `backref` only on one of the class bad practice?
>
> I'm curious because automatically creating descriptors seems possible to
> me, and I'm wondering when it happens.
>
> As
Thanks for your response.
Do you consider using `backref` only on one of the class bad practice?
I'm curious because automatically creating descriptors seems possible to me,
and I'm wondering when it happens.
As documentation states so:
Remember, when the backref keyword is used on a single
So in your example (simplified below)
class User(Base):
...
class Address(Base):
...
user = relationship('User', backref='addresses')
when you create `Address.user` the `backref` command automatically creates
the "other" side of the relationship --
Since you are effectively overwriting the table with new file
contents, the fastest may well be to truncate the table then insert
all contents. If you were to just append and update then
session.merge() is convenient way to do this though I am not sure if
the fastest.
On Sep 7, 5:53 pm, Vlad K.
No, I can't truncate the table for other reasons, as I mentioned in my
original question. :)
The issue here was not how to sync the data, but whether processed rows
stay in session even though the objects (model instances) are discarded
at the end of each iteration (each csv row), or in
On Thu, 13 May 2010 09:25:21 -0400, Michael Bayer mike...@zzzcomputing.com
wrote:
On May 13, 2010, at 7:33 AM, Faheem Mitha wrote:
Hi,
In
http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#creating-engines
it describes how permitted urls are of the form
The Devil's Programmer wrote:
So what I am trying to figure out, is if there is a way to have the
query return None in place of the missing UserVote when the user is
not logged in?
I'm hoping there might be some kind of .join_placeholder(UserVote)
method that I have somehow overlooked, or
Thanks, works like a charm :)
On Jul 15, 2:27 am, Michael Bayer mike...@zzzcomputing.com wrote:
The Devil's Programmer wrote:
So what I am trying to figure out, is if there is a way to have the
query return None in place of the missing UserVote when the user is
not logged in?
I'm
Hi,
On Sun, Jan 4, 2009 at 7:18 AM, robert rottermann rob...@redcor.ch wrote:
hi there
I have a class tblMembershiptypeTable which I defind using declarative
notation
whereas
t = tblMembershiptypeTable.__table__
mt = session.execute(select(t, t.c.name == mtype)).fetchone()
returns a
found it out myself:
related_persons = orm.relation(tblPersonTable,
secondary=tblPersonCompanyTable, backref=company)
must be
related_persons = orm.relation(tblPersonTable,
secondary=tblPersonCompanyTable.__table__, backref=company)
have a good time
robert
robert
On Dec 15, 2008, at 9:47 AM, Moshe C. wrote:
Table T has a self referential parent_id column. 'parent' is an
orm.relation using that column.
I have the following code which obviously does not work
myquery = T.query()
myquery = myquery.outerjoin('parent', aliased=True)
myquery =
As I can see, the turbogears way of creating the session as I
described above does not use a connection pool. First of all, am I
right to assume this? The default way is to create a new connection to
the database whenever a session object is instantiated this way?
the Session usually
On Jul 25, 2008, at 8:23 AM, Bram Avontuur wrote:
As I can see, the turbogears way of creating the session as I
described above does not use a connection pool. First of all, am I
right to assume this? The default way is to create a new connection to
the database whenever a session object is
On Jul 18, 2008, at 10:07 AM, Vladimir Iliev wrote:
hi,
i have a method that returns list of (material, thickness) groups
which
looks like:
C = [order_element_items.c.material_uuid,
materials.c.name,
order_element_items.c.thickness]
S =
Alle lunedì 28 gennaio 2008, Michael Bayer ha scritto:
this example is the working version of what's in ticket #948. a few
other combinations of the above are not yet working, namely if you
tried using lazy=True, or if you put an explicit correlate(users) on
the stuff_view selectable.
On Jan 28, 2008, at 12:03 PM, Stefano Bartaletti wrote:
Hello,
I have two tables defined this way:
tabItems = sqa.Table(meta, items,
sqa.Column(id, sqa.Integer, primary_key=True),
)
tabTracking = sqa.Table(meta, tracking,
sqa.Column(id, sqa.Integer,
I forgot to mention, I am using SA 0.3.10.
Thanks,
Allen
On Dec 7, 2007 7:49 AM, Allen Bierbaum [EMAIL PROTECTED] wrote:
I am trying to create two queries with some of my SA ORM objects that
will use the sum of a field found through a relationship. To be a bit
more concrete, here is a
Thanks for the feedback. I hadn't thought of doing it this way.
I did comb through the documentation a 2nd and 3rd time today though
and found the add_column() method for queries. It looks like that
may be another way to get what I want. I am thinking about even
creating a little builder
bob wrote:
Hi,
I am going over this this example to learn how to construct an eager-
loaded adjacency tree,
http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/examples/adjacencytree/byroot_tree.py
and I noticed that some of the keys in the treenodes table are given
long names in
Thanks for clearing that up! :)
Bob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to
On Oct 17, 2007, at 7:41 PM, dykang wrote:
query2 = sqlalchemy.select([test],
sqlalchemy.and_ (
test.c.id == sqlalchemy.bindparam ('id'),
test.c.name == sqlalchemy.bindparam('name'),
)
)
currently you'd have to say test.c.name == bindparam('name',
add_entity() by itself is not going to add a table to a count()
function; the extra entities arent taken into account by count().
Looking at the query you have below, i.e. the one which works, im a
little puzzled. you aren't associating the geo_route and
geo_location tables together
Hi Michael,
I've sorted this one now :)
I'm sorry for the amigious nature of my post... wasn't clear in my
head at the time.
You are right, I wasn't associating between the two entities in the
example I gave.
I ended up using sqlalchemy.sql._BinaryExpresssion in my subclass,
which enabled the
hey matt -
you might also look at a new feature we have in 0.4 called composite
column types, this is an ORM-only feature whereby you can provide
column-behavior on a plugin basis and also use multiple columns to
represent a single scalar unit:
On Apr 26, 2007, at 11:37 AM, Barry Hart wrote:
In our application's Order table, we have foreign-key fields which
reference the persons who placed the order, are responsible for
fulfilling the order, etc. For reporting speed, the Order table
holds denormalized copies of contact
35 matches
Mail list logo