and intersects methods in the first example on
http://docs.sqlalchemy.org/en/rel_0_8/orm/extensions/hybrid.html.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from
of all the [0] indexing and so on)
Hope that helps,
Simon
On 15 Aug 2013, at 02:12, csdr...@gmail.com csdr...@gmail.com wrote:
Simon, your idea about putting together a script is a good one. Please see
the attached. I think all these errors are related but I'm scratching my
head about what
]
doesn't make any sense.
Please try to create a self-contained script that demonstrates your
problem. Here is a good example:
https://groups.google.com/d/msg/sqlalchemy/jQtIRJXVfH8/LgwX-bomEIQJ
Thanks,
Simon
On Wed, Aug 14, 2013 at 2:45 AM, csdr...@gmail.com wrote:
I'm afraid there are still
#configuring-relationships
Hope that helps,
Simon
--
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, send
self.prices.append(prices) as the last line of your loop, it
should all work. In fact, if you do that, the session.add will be unnecessary
because the prices will be automatically added to the session (assuming that
the company is already in the session).
Hope that helps,
Simon
--
You received
each table in the metadata, setting the __class__
attribute to your subclass.
Hope that helps,
Simon
On Thu, Aug 1, 2013 at 12:17 AM, Gustavo Baratto gbara...@gmail.com wrote:
Thanks for the reply Michael... I had a hunch this wouldn't be easy to
tackle, but this is more than I can chew
, attr)=='bar').all()
Hope that helps,
Simon
--
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, send
://www.sqlalchemy.org/trac/wiki/UsageRecipes/BindsAsStrings
Hope that helps,
Simon
--
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
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
to pass 2 backslashes to PG, you either
need to use 4 slashes in Python (), or use a raw string (r\\)
print '\\'
\
print ''
\\
print r'\\'
\\
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from
the documentation at:
http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#sqlalchemy.orm.session.Session.execute
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from
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
(Descriptiontype).get(-2147483648)
d2 = session.query(Descriptiontype).get(-2147483648)
d3 = session.query(Descriptiontype).get(-2147483648)
assert (d1 is d2) and (d2 is d3)
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from
code to maintain. I'm not sure about the performance yet - some of the
queries feel slower than I think they should, but I haven't looked into it
properly yet.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group
/var/cache/sorcery/x86_64/libxslt-1.1.28-x86_64-pc-linux-
gnu.tar.bz2
Finished processing install requests.
I think you're on the wrong mailing list... This is SQLAlchemy
(www.sqlalchemy.org). I guess you're talking about
http://www.sourcemage.org/?
Simon
--
You received this message because
at
http://docs.sqlalchemy.org/en/rel_0_8/orm/extensions/declarative.html#table-configuration.
Note that __table_args__ here is a 1-element tuple - the comma on the
end of the line is important.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
for multiple tests, is to create a setup function. I see py.test has a
number of options for doing this:
http://pytest.org/latest/xunit_setup.html#xunitsetup
http://pytest.org/latest/fixture.html
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google
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
.
Hope that helps,
Simon
--
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, send email to sqlalchemy
Base
to a Table? I have been unsuccessful in bridging the two.
Set __table__ to your Table instance:
http://docs.sqlalchemy.org/en/rel_0_8/orm/extensions/declarative.html#using-a-hybrid-approach-with-table
Simon
--
You received this message because you are subscribed to the Google Groups
://docs.sqlalchemy.org/en/rel_0_8/orm/relationships.html#configuring-how-relationship-joins,
SA 0.8 should be able to handle this just by specifying the
foreign_keys parameter:
first_heartbeat = relationship('Heartbeat', foreign_keys=[first_heartbeat_id])
Hope that helps,
Simon
--
You received this message
a bit harder. You'll probably want to
map a class to the Reference_Assoc table (optionally using
single-table inheritance so that you have a subclass per type_key)
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe
relationships. Something like:
p =
db.query(Profile).join(City).options(contains_eager('city')).filter_by(id=p.id).limit(1).one()
I think you need to spell out each join individually - I don't think there's a
way to say 'join to all relationships'
Hope that helps,
Simon
--
You received this message
know about it.
Thanks very much for you input!
LYH
Can you connect using the mysql client directly? What happens when you run this:
mysql -u root -p -h 10.7.0.127 dbname
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe
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)). \
requires that the primary key uniquely identifies the
row in the database.
Simon
On Thu, Mar 7, 2013 at 2:00 AM, Randall Degges rdeg...@gmail.com wrote:
Hi Mike,
Sorry about that, I actually had a typo there. I've got a correct code
sample available here
http://stackoverflow.com/questions
of these
directly like Files.id. If you ever need access to the underlying Table
object, you can get it from Files.__table__.
When using things like session.query(), you can often use tables or mapped
classes interchangeably.
Hope that helps,
Simon
On 7 Mar 2013, at 20:57, Mauricio de Abreu
(
['exchange_exchange', 'exchange_area_code_pk'],
['exchange.exchange', 'exchange.area_code_pk'],
),
)
Simon
On 7 Mar 2013, at 23:49, Randall Degges rdeg...@gmail.com wrote:
Hi Lloyd,
Thank you! I believe this is what I
According to the pastie log, your table is called exchanges, not exchange,
so the target columns should be called exchanges.exchange and
exchanges.area_code_pk.
Simon
On 8 Mar 2013, at 00:27, Randall Degges rdeg...@gmail.com wrote:
Hi Simon,
Ok cool. So, I updated that, but now I'm
are using, but in pyramid I think
you would set the response.body attribute to your contentstr, rather
than returning it. Does that make any difference?
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop
subjective, but I find that easier to read.
You can also use and | but I think you have to be a little
careful with operator precedence. You can probably write this:
ands.append((Useraccount.gender == gender) (Useraccount.age == age))
Simon
--
You received this message because you
,
Simon
--
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, send email to sqlalchemy@googlegroups.com
, dbmeta, autoload=True, autoload_with=dbengine)
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 the time is being spent.
Hope that helps,
Simon
--
You received this message because you
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
/en/rel_0_8/orm/session.html#using-sql-expressions-with-sessions
Hope that helps,
Simon
--
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
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
like this should do what you want:
conditions = []
for jj in list(chunks(val, 5)):
conditions.append(Azienda.c.id.in_( jj ))
qry = qry.filter(sa.or_(*conditions))
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
should be able to do this:
print sample[Sample.id]
print sample[Experiment.id]
Hope that helps,
Simon
--
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
(Word.word)),
func.min(func.length(Word.word))).all()
Hope that helps,
Simon
--
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
this work for you:
def number_of_people_older_than(age)
q = people_older_than(age)
return q.count()
See also http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#counting
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
the
server_version_info check (for version 4.0.3) made the problem go
away.
Cheers,
Simon
--
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
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
() are unnecessary - filtering a query already
implies that you are AND-ing the condition with all the previous
conditions)
Simon
--
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
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).\
join
back, are completely outside the
scope of this list and I'm afraid you are unlikely to find much help
here with it.
Sorry I can't be more help,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
row.
If (1, 4) is actually the new version of (1, 1), then I would say that
your primary key should just be the acct_id column, not the pair of
(acct_id, env_id). SA will then see them as the same row, and UPDATE
rather than INSERT.
Simon
--
You received this message because you are subscribed
referenced above
illustrates a command-line session using them, so there's no reason
why you couldn't do the same in a worker process.
Have you already tried it and found that it doesn't work?
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
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
://docs.sqlalchemy.org/en/rel_0_7/orm/extensions/declarative.html#accessing-the-metadata
Hope that helps,
Simon
--
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
want to start with something smaller such as
Flask.
Hope that helps,
Simon
--
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
sqlalchemy
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
(sa.or_(dbObj.foo2 == 'abc',
dbObj.foo3 == 'def'))
.order_by(dbObj.foo2)
.all())
Remember multiple filter clauses are automatically AND-ed together.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
using multiple processes with mod_wsgi? If so,
remember that each process will have its own pool, so if you had 2
processes, you could have up to 30 connections open.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
#sqlalchemy.events.PoolEvents.connect
'connect' event handlers look like this:
connect(dbapi_connection, connection_record)
Can't you use the dbapi_connection to call your SQL function?
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
to build long lists of bindparam objects. I've no
idea if this is still the case these days. The best thing you can do
is just try it.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
time.isoformat()
in filter constraints. Hope that's portable to windows! Thanks (again) for
your help--this is the second time you've helped me out here.
Much appreciated. Simon.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion
or later), and I have confirmed it emits the correct DDL but
still treats all bound time values as DATETIMEs anyway. Is this a bug or am
I missing something?
Many thanks, Simon.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion
- such as if the database
returned a string 1, that would cause the get() above to not locate
integer 1 in the cache.
This was exactly the issue. Many thanks for your help with this--apologies
for not getting back to you sooner.
Simon.
--
You received this message because you are subscribed
and can't find anything that
might affect this. Am I missing something? I'm going to dig into the session
identity map code now to see what I can find, but I'd appreciate it if
anyone already knows where I'm going wrong.
Many thanks,
Simon.
--
You received this message because you
module that imports the first. This can then be run with python
-m mypackage.main.
This isn't so helpful if you were intending to have a number of modules that
could be run independently. Perhaps you could live with something like
python -m mypackage.main mod1 mod2 mod3?
Hope that helps,
Simon
PS
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Michael Bayer
Sent: 27 September 2011 19:37
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Possible bug with subqueryload
On Sep 27, 2011, at 1:16 PM, King Simon
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
in the main query.
Cheers,
Simon
import sqlalchemy as sa
import sqlalchemy.orm as saorm
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Master(Base):
__tablename__ = 'master'
id
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Michael Bayer
Sent: 27 September 2011 16:24
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Possible bug with subqueryload
Hi Simon -
yeah that looks pretty buglike
.
create_column isn't an SQLAlchemy method as far as I know. Are you using
something like sqlalchemy-migrate
(http://code.google.com/p/sqlalchemy-migrate/)?
If so, you'll probably get more help on their mailing list.
Hope that helps,
Simon
--
You received this message because you are subscribed
object table.c.empno instead
Hope that helps,
Simon
pravin battula wrote
Mike,
when i execute the below sql statement directly in the database using
sqlyog,it works fine but when tried with sqlalchemy it didn't.
update mytable set EmpMaster = cast(empno as UNSIGNED INTEGER)
On Sep 14, 8
/sqlalchemy/file/3e75f284f253/examples/vertical
I don't think it's exactly what you've described, but hopefully it's a
starting point.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
this (assuming MyMappedClass
is the class mapped to MyTable):
s = MyMappedClass
query = self.session.query(s).filter(s.my_name == self.my_name)
sts = query.first()
sts.status = 'L'
self.session.flush()
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
this?
I *think* you should be able to use session.merge instead:
http://www.sqlalchemy.org/docs/orm/session.html#merging
temp = Item(item=itemno, ...)
new = db.session.merge(temp)
db.session.commit()
(note that 'merge' returns a new object attached to the session)
Hope that helps,
Simon
--
You
UTC, Simon King wrote:
I've looked at the SA documentation and as far as I can see
the 'add'
does an insert or an update.
I think this is incorrect - 'add' always corresponds to
'INSERT'
Only for brand new instances, not associated with a session. For
*detached
it to echo.
This is explained in the note at the bottom of
http://www.sqlalchemy.org/docs/core/engines.html#configuring-logging.
(not that that necessarily helps you, but it does at least say that it
is expected behaviour)
Simon
--
You received this message because you are subscribed
.
Simon
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Krishnakant Mane
Sent: 20 July 2011 15:16
To: sqlalchemy@googlegroups.com
Cc: Timuçin Kızılay
Subject: Re: [sqlalchemy] how to get last record from a resultset
Well
)))]
start_response(status, response_headers)
return [output]
It would be worth comparing the output from that with the values of
sys.prefix and sys.path when run from bottle.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy
rows in Table B that
reference them. However, I don't think it necessarily performs deletions
before insertions.
Simon
--
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
framework are you using (if any)? It sounds
like they are hampering your efforts to debug this. You might find it
easier to run a very simple wsgi server such as the one in the wsgiref
module:
http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server
Simon
--
You received this message
it is something like
/var/log/httpd/error_log. Does that shed any light on the problem?
Simon
--
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
Eduardo wrote
On Jul 13, 7:11 pm, King Simon-NFHD78
simon.k...@motorolasolutions.com wrote:
Eduardo wrote
Hi,
I am trying to prompt an answer from a database after failed
create_engine command. I searched through the source code and I
found
TypeError, and ValueError returns
committed at the end of the web request, so any
changes you've made are being discarded?
Simon
--
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
committed at the end of the web request, so any
changes you've made are being discarded?
Simon
--
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
Eduardo wrote:
On Jul 14, 10:49 am, King Simon-NFHD78
simon.k...@motorolasolutions.com wrote:
Eduardo wrote
When I use the same script with a standalone application it works
but
when I try to run it as a wsgi application it fails (wsgi logs
does
not contain any information
, and if so, can you show us the traceback?
Simon
--
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
sqlalchemy+unsubscr...@googlegroups.com
://www.sqlalchemy.org/docs/orm/relationships.html#one-to-many)
Hope that helps,
Simon
--
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
/trac/wiki/FAQ)
Hope that helps,
Simon
--
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
sqlalchemy+unsubscr...@googlegroups.com.
For more
in the repository, but the website is so
convenient...)
Cheers,
Simon
--
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
sqlalchemy
):
class Feature(Base, GeometryTableMixIn):
__table__ = tablename
# etc.
return Feature
...but the whole thing feels strange. What are you actually trying to
do?
Cheers,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group
= saorm.Session(bind=self.engine)
def get_item(self, id):
return self.session.query(ProjectItem).get(id)
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
= ArkUserContactGUID(google_UID=entry.get_id())
data.google_UID.append(obj)
(If I've misunderstood your mapping, these class names are probably
wrong)
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
in the
session.
I hope that helps,
Simon
--
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
sqlalchemy+unsubscr...@googlegroups.com.
For more options
):
http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.S
ession.get_bind
...but even then, I'm not sure you can necessarily go from an engine to
a db name. What do you even mean by db name? Schema name? Host?
Dialect? Filename?
Simon
--
You received this message because you
) Use your Session directly - it implements the same interface as the
real session, and forwards all requests on to the underlying
thread-local session.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
that helps,
Simon
--
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
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
(
TagAssociation,
primary_join=(sa.and_(id == TagAssociation.post_id,
owner_id == TagAssociation.owner_id)))
I think you would have to treat this relationship as readonly, so you
might need/want to add viewonly=True.
Hope that helps,
Simon
--
You received
(t_posts.c.created_atend_date)
Hope that helps,
Simon
--
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
sqlalchemy+unsubscr...@googlegroups.com
orm_obj.id after Session.commit() will trigger another
(possibly unnecessary) query to the database.
Hope that helps,
Simon
--
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
, there is a 'before_execute' event which you could listen
for, and look for INSERT clauses.
If you can't upgrade to 0.7, you might be able to use a ConnectionProxy:
http://www.sqlalchemy.org/docs/07/core/interfaces.html
Hope that helps,
Simon
--
You received this message because you are subscribed
,
Simon
--
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
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group
('repo_id', Integer, ForeignKey('package_repo.repo_id'),
Column('msg',String))
I *think* SA will automatically work out the relationship condition
based on those two foreign keys.
Hope that helps,
Simon
package_repo_table = Table('package_repo', metadata,
Column('package_id',Integer
wrapper for the Address class that adds the join condition into any
attribute comparison operations.
Good idea, or silly idea? (Or perhaps it already works...)
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
is importing the submodules inside
the myapp/models/__init__.py
Hope that helps,
Simon
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of eric cire
Sent: 30 March 2011 14:57
To: sqlalchemy
Subject: [sqlalchemy] Re
601 - 700 of 921 matches
Mail list logo