<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
  <channel>
  <title>sqlalchemy Google Group</title>
  <link>http://groups.google.com/group/sqlalchemy</link>
  <description>General user and developer discussion of the SQLAlchemy SQL construction and object-relational tool for Python.</description>
  <language>en</language>
  <item>
  <title>The problem with Oldest transaction (Firebird)</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/095a681fd5e18112/fdb65e225bc6b4e5?show_docid=fdb65e225bc6b4e5</link>
  <description>
  I use SQLAlchemy inside Tornado, and I use a singleton to make the Firebird &lt;br&gt; connection inside application. &lt;br&gt; class FirebirdDatabase(object): &lt;br&gt; def __init__(self, firebird_params, echo=False): &lt;br&gt; engine = &lt;br&gt; create_engine(&#39;firebird+fdb:// %(user)s:%(password)s@%(host)s :%(port)s/%(path)s&#39; &lt;br&gt; % firebird_params,
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/095a681fd5e18112/fdb65e225bc6b4e5?show_docid=fdb65e225bc6b4e5</guid>
  <author>
  a.zhabotins...@gmail.com
  (graf)
  </author>
  <pubDate>Tue, 18 Jun 2013 22:09:40 UT
</pubDate>
  </item>
  <item>
  <title>Re: The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/8ad16829aa2b02d3?show_docid=8ad16829aa2b02d3</link>
  <description>
  This is an interesting question :) &lt;br&gt; Description: Looking for a project in which students (ManyToMany) to &lt;br&gt; address (OneToOne) with the street dying text &amp;quot;Jana&amp;quot; and delete this row. &lt;br&gt; subq = &lt;br&gt; session.query(Addressess.id).f ilter(Addressess.street.like(&#39; %Jana%&#39;)).subquery() &lt;br&gt; session.query(Projects).filter (Projects.students.any(Person. addressess_id.in_(subq))).dele te(synchronize_session=&#39;fetch&#39; )
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/8ad16829aa2b02d3?show_docid=8ad16829aa2b02d3</guid>
  <author>
  witold.g...@gmail.com
  (Witold Greń)
  </author>
  <pubDate>Tue, 18 Jun 2013 21:55:54 UT
</pubDate>
  </item>
  <item>
  <title>Re: The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/b775882076cd2d0b?show_docid=b775882076cd2d0b</link>
  <description>
  Resolverd no. 5: &lt;br&gt; session.query(Projects).filter (Projects.students.any(and_(Pe rson.gender == &lt;br&gt; False, Person.name.like(&#39;M%&#39;) )))\ &lt;br&gt; .update({Projects.name: u&#39;New project name&#39;, Projects.supervisor_id: &lt;br&gt; 1}, synchronize_session=False) &lt;br&gt; Again many thanks Michael :)
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/b775882076cd2d0b?show_docid=b775882076cd2d0b</guid>
  <author>
  witold.g...@gmail.com
  (Witold Greń)
  </author>
  <pubDate>Tue, 18 Jun 2013 21:14:51 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/449d26d141ba2441?show_docid=449d26d141ba2441</link>
  <description>
  any() does the subquery correlated to the related table for you: &lt;br&gt; &lt;p&gt;s.query(Projects).filter(Proje cts.students.any(and_(Person.g ender == False, Person.name.like(&#39;x&#39;)))).count ()
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/449d26d141ba2441?show_docid=449d26d141ba2441</guid>
  <author>
  mike...@zzzcomputing.com
  (Michael Bayer)
  </author>
  <pubDate>Tue, 18 Jun 2013 21:08:23 UT
</pubDate>
  </item>
  <item>
  <title>Re: The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/6a40481fd7194abe?show_docid=6a40481fd7194abe</link>
  <description>
  Thanks for your help Michael :) &lt;br&gt; &lt;p&gt;Resolved: &lt;br&gt; No.2 &lt;br&gt; &lt;p&gt;subq = session.query(Person.group_lea der_id).filter(or_(Person.name == &lt;br&gt; &#39;Jan&#39;, Person.surname == &#39;Nowak&#39;)).subquery() &lt;br&gt; &lt;p&gt;session.query(Person).filter(P erson.id.in_(subq)).update({Pe rson.name: &lt;br&gt; u&#39;Łukasz&#39;}, synchronize_session=False)
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/6a40481fd7194abe?show_docid=6a40481fd7194abe</guid>
  <author>
  witold.g...@gmail.com
  (Witold Greń)
  </author>
  <pubDate>Tue, 18 Jun 2013 20:46:29 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/f7aee83b78522917?show_docid=f7aee83b78522917</link>
  <description>
  if the database you&#39;re using doesn&#39;t support UPDATE..FROM (which is likely), the normal way is to UPDATE with a subquery, which may be correlated or in a simple case like this just using IN: &lt;br&gt; &lt;p&gt;UPDATE price SET extra=20000 WHERE price.id in (select price_id from person where name like &#39;J%&#39;) &lt;br&gt; &lt;p&gt;subq = session.query(Person.price_id) .where(Person.name.like(&#39;J%&#39;)) .subquery()
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/f7aee83b78522917?show_docid=f7aee83b78522917</guid>
  <author>
  mike...@zzzcomputing.com
  (Michael Bayer)
  </author>
  <pubDate>Tue, 18 Jun 2013 19:13:50 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] between .one() and .first()</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fe884775d231eb/dd03717568cfdbf1?show_docid=dd03717568cfdbf1</link>
  <description>
  From the docs: &lt;br&gt; &amp;quot;one() &lt;br&gt; &lt;p&gt;Return exactly one result or raise an exception. &lt;br&gt; &lt;p&gt;Raises sqlalchemy.orm.exc.NoResultFou nd if the query selects no rows. &lt;br&gt; &lt;p&gt;Raises sqlalchemy.orm.exc.MultipleRes ultsFound if multiple object &lt;br&gt; identities are returned, or if multiple rows are returned for a query &lt;br&gt; that does not return object identities.&amp;quot;
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fe884775d231eb/dd03717568cfdbf1?show_docid=dd03717568cfdbf1</guid>
  <author>
  ianmarcinkow...@gmail.com
  (ian marcinkowski)
  </author>
  <pubDate>Tue, 18 Jun 2013 18:30:04 UT
</pubDate>
  </item>
  <item>
  <title>Re: The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/ee630234de5181a7?show_docid=ee630234de5181a7</link>
  <description>
  I try resolved problem used this code: &lt;br&gt; &lt;p&gt;No 5: &lt;br&gt; &lt;p&gt;sql = session.query(Projects).join(P erson, &lt;br&gt; Projects.students).filter(Pers on.gender==False, Person.name.like(&#39;M%&#39;)) &lt;br&gt; &lt;p&gt;for projects in sql: &lt;br&gt; projects.supervisor_id = 1 &lt;br&gt; &lt;p&gt;session.commit() &lt;br&gt; &lt;p&gt;but it is probably not a very efficient way?
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/ee630234de5181a7?show_docid=ee630234de5181a7</guid>
  <author>
  witold.g...@gmail.com
  (Witold Greń)
  </author>
  <pubDate>Tue, 18 Jun 2013 18:01:22 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] sqlite in memory</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/218e4f9547f85701/e89e360b9112f71d?show_docid=e89e360b9112f71d</link>
  <description>
  Petr, just found something intesting that may work for anyone: &lt;br&gt; &lt;p&gt;&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://blog.marcus-brinkmann.de/2010/08/27/how-to-use-sqlites-backup-in-python/&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; &lt;p&gt;I was able do create a database totally in memory and them just &amp;quot;dump&amp;quot; &lt;br&gt; it to a file. The process now takes about 5 minutes, against one hour+ &lt;br&gt; that it took earlier.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/218e4f9547f85701/e89e360b9112f71d?show_docid=e89e360b9112f71d</guid>
  <author>
  rich...@humantech.com.br
  (Richard Gerd Kuesters)
  </author>
  <pubDate>Mon, 17 Jun 2013 19:29:50 UT
</pubDate>
  </item>
  <item>
  <title>The problem with the update</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/53914d949c81f8d2?show_docid=53914d949c81f8d2</link>
  <description>
  Hi, I&#39;m Witold and learn Sqlalchemy :) &lt;br&gt; I have a little problem, here it is: &lt;br&gt; &lt;p&gt;This is my DB: &lt;br&gt; &lt;p&gt;class Addressess(Base): &lt;br&gt; &lt;p&gt; __tablename__ = &#39;addressess&#39; &lt;br&gt; &lt;p&gt; id = Column(&#39;id&#39;, Integer, Sequence(&#39;address_id_seq&#39;), &lt;br&gt; primary_key=True, index=True, unique=True, nullable=False) &lt;br&gt; street = Column(&#39;street&#39;, String(200))
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/86d1c809818649b6/53914d949c81f8d2?show_docid=53914d949c81f8d2</guid>
  <author>
  witold.g...@gmail.com
  (Witold Greń)
  </author>
  <pubDate>Mon, 17 Jun 2013 19:09:18 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] between .one() and .first()</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fe884775d231eb/aed27826e8ed1fd0?show_docid=aed27826e8ed1fd0</link>
  <description>
  Simply handling NoResultFound should work just fine... &lt;br&gt; &lt;p&gt;def zero_or_one(query): &lt;br&gt; try: &lt;br&gt; return query.one() &lt;br&gt; except NoResultFound: &lt;br&gt; return None
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fe884775d231eb/aed27826e8ed1fd0?show_docid=aed27826e8ed1fd0</guid>
  <author>
  encu...@gmail.com
  (Petr Viktorin)
  </author>
  <pubDate>Mon, 17 Jun 2013 17:57:26 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] between .one() and .first()</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fe884775d231eb/c6042b0628076d84?show_docid=c6042b0628076d84</link>
  <description>
  Am 17.06.2013, 08:58 Uhr, schrieb Chris Withers &amp;lt;ch...@simplistix.co.uk&amp;gt;: &lt;br&gt; &lt;p&gt;.count() would seem to be your friend here, at least in case that a lot of &lt;br&gt; rows might be returned. &lt;br&gt; &lt;p&gt;Only if you can express that need as a query. &lt;br&gt; &lt;p&gt;Charlie &lt;br&gt; -- &lt;br&gt; Charlie Clark &lt;br&gt; Managing Director &lt;br&gt; Clark Consulting &amp;amp; Research
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fe884775d231eb/c6042b0628076d84?show_docid=c6042b0628076d84</guid>
  <author>
  charlie.cl...@clark-consulting.eu
  (Charlie Clark)
  </author>
  <pubDate>Mon, 17 Jun 2013 17:47:56 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] Unique constraints disappearing</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/0fb47f64272305ad/29f07f7c46bb3400?show_docid=29f07f7c46bb3400</link>
  <description>
  unique constraints are not currently reflected. This feature was just added in master and is currently set for release in 0.9.0.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/0fb47f64272305ad/29f07f7c46bb3400?show_docid=29f07f7c46bb3400</guid>
  <author>
  mike...@zzzcomputing.com
  (Michael Bayer)
  </author>
  <pubDate>Mon, 17 Jun 2013 16:39:25 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] SQLAlchemy 0.8.1 + fdb, row size</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fce09b389918a1/962a1f8d9fadda13?show_docid=962a1f8d9fadda13</link>
  <description>
  this would be a difference in how they handle unicode. I&#39;ve run tests for fdb here against unicode values and haven&#39;t observed that issue. &lt;br&gt; &lt;p&gt;its possible fdb is doing the right thing here. You should carefully look at how non-ASCII characters are being placed in that column both with kinterbasdb and with fdb.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/44fce09b389918a1/962a1f8d9fadda13?show_docid=962a1f8d9fadda13</guid>
  <author>
  mike...@zzzcomputing.com
  (Michael Bayer)
  </author>
  <pubDate>Mon, 17 Jun 2013 16:38:24 UT
</pubDate>
  </item>
  <item>
  <title>Re: [sqlalchemy] sqlite in memory</title>
  <link>http://groups.google.com/group/sqlalchemy/browse_thread/thread/218e4f9547f85701/ad9dbbf77424da8f?show_docid=ad9dbbf77424da8f</link>
  <description>
  Hmmm, never knew of that. All my &amp;quot;constraints&amp;quot; are already predefined &lt;br&gt; and inserts are in order so I won&#39;t get a broken FK. I&#39;ll try that too &lt;br&gt; see if it increases the speed (decreasing my headaches per build, lol). &lt;br&gt; &lt;p&gt;Thanks a lot, Petr!
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/sqlalchemy/browse_thread/thread/218e4f9547f85701/ad9dbbf77424da8f?show_docid=ad9dbbf77424da8f</guid>
  <author>
  rich...@humantech.com.br
  (Richard Gerd Kuesters)
  </author>
  <pubDate>Mon, 17 Jun 2013 16:37:01 UT
</pubDate>
  </item>
  </channel>
</rss>
