<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/dialect/test_sqlite.py, branch pr/151</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>- rework tests for attached databases into individual tests,</title>
<updated>2014-09-29T22:09:25+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-09-29T22:09:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4da020dae324cb871074e302f4840e8731988be0'/>
<id>4da020dae324cb871074e302f4840e8731988be0</id>
<content type='text'>
test both memory and file-based
- When selecting from a UNION using an attached database file,
the pysqlite driver reports column names in cursor.description
as 'dbname.tablename.colname', instead of 'tablename.colname' as
it normally does for a UNION (note that it's supposed to just be
'colname' for both, but we work around it).  The column translation
logic here has been adjusted to retrieve the rightmost token, rather
than the second token, so it works in both cases.   Workaround
courtesy Tony Roberts.
fixes #3211
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
test both memory and file-based
- When selecting from a UNION using an attached database file,
the pysqlite driver reports column names in cursor.description
as 'dbname.tablename.colname', instead of 'tablename.colname' as
it normally does for a UNION (note that it's supposed to just be
'colname' for both, but we work around it).  The column translation
logic here has been adjusted to retrieve the rightmost token, rather
than the second token, so it works in both cases.   Workaround
courtesy Tony Roberts.
fixes #3211
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'sqlite-temp-table-reflection' of https://bitbucket.org/jerdfelt/sqlalchemy/branch/sqlite-temp-table-reflection into pr31</title>
<updated>2014-09-17T19:16:33+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-09-17T19:16:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=7864f80a62ee17fc6d31c7531b179685d097dd98'/>
<id>7864f80a62ee17fc6d31c7531b179685d097dd98</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Added :meth:`.Inspector.get_temp_table_names` and</title>
<updated>2014-09-17T19:15:21+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-09-17T19:15:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=cb23fa243f5138aac7acb2a134d567f1a297d42e'/>
<id>cb23fa243f5138aac7acb2a134d567f1a297d42e</id>
<content type='text'>
:meth:`.Inspector.get_temp_view_names`; currently, only the
SQLite dialect supports these methods.    The return of temporary
table and view names has been **removed** from SQLite's version
of :meth:`.Inspector.get_table_names` and
:meth:`.Inspector.get_view_names`; other database backends cannot
support this information (such as MySQL), and the scope of operation
is different in that the tables can be local to a session and
typically aren't supported in remote schemas.
fixes #3204
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
:meth:`.Inspector.get_temp_view_names`; currently, only the
SQLite dialect supports these methods.    The return of temporary
table and view names has been **removed** from SQLite's version
of :meth:`.Inspector.get_table_names` and
:meth:`.Inspector.get_view_names`; other database backends cannot
support this information (such as MySQL), and the scope of operation
is different in that the tables can be local to a session and
typically aren't supported in remote schemas.
fixes #3204
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle sqlite get_unique_constraints() call for temporary tables</title>
<updated>2014-09-17T15:01:01+00:00</updated>
<author>
<name>Johannes Erdfelt</name>
<email>johannes@erdfelt.com</email>
</author>
<published>2014-09-17T14:52:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9d402e204d77da680472cbfb9813e437eb187944'/>
<id>9d402e204d77da680472cbfb9813e437eb187944</id>
<content type='text'>
The sqlite get_unique_constraints() implementation did not do a union
against the sqlite_temp_master table like other code does. This could
result in an exception being raised if get_unique_constraints() was
called against a temporary table.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sqlite get_unique_constraints() implementation did not do a union
against the sqlite_temp_master table like other code does. This could
result in an exception being raised if get_unique_constraints() was
called against a temporary table.
</pre>
</div>
</content>
</entry>
<entry>
<title>- add tests for the savepoint recipe</title>
<updated>2014-08-09T18:03:17+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-09T18:03:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=cca4d8fc73df042e938447ec0bc990be28c4fb11'/>
<id>cca4d8fc73df042e938447ec0bc990be28c4fb11</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed a few errant ``u''`` strings that would prevent tests from passing</title>
<updated>2014-03-22T22:48:59+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-03-22T22:48:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5d2bfc4df45bd2f3347391c67b975066fdb74723'/>
<id>5d2bfc4df45bd2f3347391c67b975066fdb74723</id>
<content type='text'>
in Py3.2.  Patch courtesy Arfrever Frehtes Taifersar Arahesis. fixes #2980
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in Py3.2.  Patch courtesy Arfrever Frehtes Taifersar Arahesis. fixes #2980
</pre>
</div>
</content>
</entry>
<entry>
<title>- dont need this import and it's not in 2.6 anyway</title>
<updated>2014-02-17T21:03:07+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-02-17T21:03:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=b4d9795db164ccb509ddac311f640df1a75a74e5'/>
<id>b4d9795db164ccb509ddac311f640df1a75a74e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- rewrite SQLite reflection tests into one consistent fixture, which tests</title>
<updated>2014-02-16T23:14:10+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-02-16T23:14:10+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=00c6ebb4408964583943826c831064e1d7472169'/>
<id>00c6ebb4408964583943826c831064e1d7472169</id>
<content type='text'>
both _resolve_type_affinity() directly as well as round trip tests fully.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
both _resolve_type_affinity() directly as well as round trip tests fully.
</pre>
</div>
</content>
</entry>
<entry>
<title>- The SQLite dialect will now skip unsupported arguments when reflecting</title>
<updated>2014-02-16T22:20:18+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-02-16T22:20:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5e100a70c51362b522c8d4a05c0149c7d77672fb'/>
<id>5e100a70c51362b522c8d4a05c0149c7d77672fb</id>
<content type='text'>
types; such as if it encounters a string like ``INTEGER(5)``, the
:class:`.INTEGER` type will be instantiated without the "5" being included,
based on detecting a ``TypeError`` on the first attempt.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
types; such as if it encounters a string like ``INTEGER(5)``, the
:class:`.INTEGER` type will be instantiated without the "5" being included,
based on detecting a ``TypeError`` on the first attempt.
</pre>
</div>
</content>
</entry>
<entry>
<title>SQLite dialect - support relection from affinity</title>
<updated>2014-02-04T00:55:00+00:00</updated>
<author>
<name>Erich Blume</name>
<email>blume.erich@gmail.com</email>
</author>
<published>2014-02-04T00:55:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e47f99450378a7b1ea29a8493c0692bcf8669da3'/>
<id>e47f99450378a7b1ea29a8493c0692bcf8669da3</id>
<content type='text'>
SQLite allows column types that aren't technically understood in sqlite
by using 'data affinity', which is an algorithm for converting column
types in to some sort of useful type that can be stored and retrieved
from the db. Unfortunatly, this breaks reflection since we (previously)
expected a sqlite db to reflect column types that we permit in the
`ischema_names` for that dialect.

This patch changes the logic for 'unknown' column types during
reflection to instead run through SQLite's data affinity algorithm, and
assigns appropriate types from that.

It also expands the matching for column type to include column types
with spaces (strongly discouraged but allowed by sqlite) and also
completely empty column types (in which case the NullType is assigned,
which sqlite will treat as a Blob - or rather, Blob is treated as
NullType). These changes mean that SQLite will never raise an error for
an unknown type during reflection - there will always be some 'useful'
type returned, which follows the spirit of SQLite (accomodation before
sanity!).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SQLite allows column types that aren't technically understood in sqlite
by using 'data affinity', which is an algorithm for converting column
types in to some sort of useful type that can be stored and retrieved
from the db. Unfortunatly, this breaks reflection since we (previously)
expected a sqlite db to reflect column types that we permit in the
`ischema_names` for that dialect.

This patch changes the logic for 'unknown' column types during
reflection to instead run through SQLite's data affinity algorithm, and
assigns appropriate types from that.

It also expands the matching for column type to include column types
with spaces (strongly discouraged but allowed by sqlite) and also
completely empty column types (in which case the NullType is assigned,
which sqlite will treat as a Blob - or rather, Blob is treated as
NullType). These changes mean that SQLite will never raise an error for
an unknown type during reflection - there will always be some 'useful'
type returned, which follows the spirit of SQLite (accomodation before
sanity!).
</pre>
</div>
</content>
</entry>
</feed>
