summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
Commit message (Collapse)AuthorAgeFilesLines
...
* fixed reflection of unicode, [ticket:881]Mike Bayer2007-11-271-6/+9
|
* - named_with_column becomes an attributeMike Bayer2007-11-251-5/+13
| | | | | | | | | - cleanup within compiler visit_select(), column labeling - is_select() removed from dialects, replaced with returns_rows_text(), returns_rows_compiled() - should_autocommit() removed from dialects, replaced with should_autocommit_text() and should_autocommit_compiled() - typemap and column_labels collections removed from Compiler, replaced with single "result_map" collection. - ResultProxy uses more succinct logic in combination with result_map to target columns
* - anonymous column expressions are automatically labeled.Mike Bayer2007-11-101-1/+1
| | | | | | | | | | | | | | | | | | | e.g. select([x* 5]) produces "SELECT x * 5 AS anon_1". This allows the labelname to be present in the cursor.description which can then be appropriately matched to result-column processing rules. (we can't reliably use positional tracking for result-column matches since text() expressions may represent multiple columns). - operator overloading is now controlled by TypeEngine objects - the one built-in operator overload so far is String types overloading '+' to be the string concatenation operator. User-defined types can also define their own operator overloading by overriding the adapt_operator(self, op) method. - untyped bind parameters on the right side of a binary expression will be assigned the type of the left side of the operation, to better enable the appropriate bind parameter processing to take effect [ticket:819]
* - inlined a couple of context variablesMike Bayer2007-10-271-3/+3
| | | | - PG two phase was calling text() without the correct bind param format, previous compiler checkin revealed issue
* - removed regular expression step from most statement compilations.Mike Bayer2007-10-271-14/+18
| | | | | | also fixes [ticket:833] - inlining on PG with_returning() call - extra options added for profiling
* Added support for dialects that have both sequences and autoincrementing PKs.Jason Kirtland2007-10-231-1/+2
|
* - PG reflection, upon seeing the default schema name being used explicitlyMike Bayer2007-10-141-0/+5
| | | | | | | | | as the "schema" argument in a Table, will assume that this is the the user's desired convention, and will explicitly set the "schema" argument in foreign-key-related reflected tables, thus making them match only with Table constructors that also use the explicit "schema" argument (even though its the default schema). In other words, SA assumes the user is being consistent in this usage.
* Snipped another generator expression.Jason Kirtland2007-10-131-1/+2
|
* make two-phase transactions work a bit better by letting psycopg do whatever ↵Ants Aasma2007-10-101-0/+2
| | | | | | it does for implicit transaction starts
* - a better fix for [ticket:810]. The cause was two phase commit/rollback not ↵Ants Aasma2007-10-081-3/+2
| | | | opening a new transaction as the dbapi implementations do.
* - fix multiple consequent two phase transactions not working with postgres. ↵Ants Aasma2007-10-081-0/+3
| | | | | | For some reason implicit transactions are not enough. [ticket:810] - add an option to scoped session mapper extension to not automatically save new objects to session.
* - move PG RETURNING tests to postgres dialect testMike Bayer2007-10-041-0/+7
| | | | | - added server_version_info() support for PG dialect - exclude PG versions < 8.4 for RETURNING tests
* Made the regexp detecting the returning token more readable and fixed a ↵Ants Aasma2007-10-031-2/+13
| | | | couple of corner cases
* add support for returning results from inserts and updates for postgresql ↵Ants Aasma2007-10-021-3/+47
| | | | 8.2+. [ticket:797]
* removed unused _fold_identifier_case methodMike Bayer2007-10-021-3/+0
|
* Make the postgres_where attribute to Index private to postgres module by ↵Ants Aasma2007-10-011-2/+11
| | | | using a kwargs attribute on the Index.
* - added partial index support for postgresAnts Aasma2007-09-291-1/+17
| | | | - fixed create and drop methods on MockConnection
* - adjust server side logic to work with standalone default executionMike Bayer2007-09-271-5/+9
| | | | - a little bit of inlining of same
* - added "FETCH" to the keywords detected by Postgres to indicate a ↵Mike Bayer2007-09-261-0/+7
| | | | | | result-row holding statement (i.e. in addition to "SELECT").
* sequence pre-executes dont create an ExecutionContext, use straight cursorMike Bayer2007-09-011-4/+4
|
* factored out uses_sequences_for_inserts() intoMike Bayer2007-09-011-3/+1
| | | | preexecute_sequence dialect attribute
* - merged inline inserts branchMike Bayer2007-09-011-14/+11
| | | | | | | | | | | | - all executemany() style calls put all sequences and SQL defaults inline into a single SQL statement and don't do any pre-execution - regular Insert and Update objects can have inline=True, forcing all executions to be inlined. - no last_inserted_ids(), lastrow_has_defaults() available with inline execution - calculation of pre/post execute pushed into compiler; DefaultExecutionContext greatly simplified - fixed postgres reflection of primary key columns with no sequence/default generator, sets autoincrement=False - fixed postgres executemany() behavior regarding sequences present, not present, passivedefaults, etc. - all tests pass for sqlite, mysql, postgres; oracle tests pass as well as they did previously including all insert/update/default functionality
* engine.url cleanups [ticket:742]Jason Kirtland2007-08-291-1/+1
| | | | | | - translate_connect_args can now take kw args or the classic list - in-tree dialects updated to supply their overrides as keywords - tweaked url parsing in the spirit of the #742 patch, more or less
* - added **modifiers to _get_from_objectsMike Bayer2007-08-221-8/+7
| | | | - fixed up PG distinct flag
* - method call removalMike Bayer2007-08-201-4/+5
|
* 1. Module layout. sql.py and related move into a package called "sql".Mike Bayer2007-08-181-28/+20
| | | | | | | | | | | | 2. compiler names changed to be less verbose, unused classes removed. 3. Methods on Dialect which return compilers, schema generators, identifier preparers have changed to direct class references, typically on the Dialect class itself or optionally as attributes on an individual Dialect instance if conditional behavior is needed. This takes away the need for Dialect subclasses to know how to instantiate these objects, and also reduces method overhead by one call for each one. 4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument. 5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
* mass has_key->__contains__ migration, [ticket:738]Mike Bayer2007-08-151-1/+1
|
* - merged "fasttypes" branch. this branch changes the signatureMike Bayer2007-08-141-25/+43
| | | | | | | | | | | | | of convert_bind_param() and convert_result_value() to callable-returning bind_processor() and result_processor() methods. if no callable is returned, no pre/post processing function is called. - hooks added throughout base/sql/defaults to optimize the calling of bind param/result processors so that method call overhead is minimized. special cases added for executemany() scenarios such that unneeded "last row id" logic doesn't kick in, parameters aren't excessively traversed. - new performance tests show a combined mass-insert/mass-select test as having 68% fewer function calls than the same test run against 0.3. - general performance improvement of result set iteration is around 10-20%.
* - fixes to PG unicode table/sequence reflection/create/dropsMike Bayer2007-08-101-3/+3
|
* - added 'object_session' as classlevel method to SessionMike Bayer2007-08-091-1/+3
| | | | | | | - moved 'identity_key' to be a classmethod on Session - some docstrings - merged r3229 from 0.3 branch to unconditonally quote schemaname in PG-reflected default - name fixes in dynamic unit test
* - fixed table_names for postgres to return as dialect.encoding-decoded ↵Mike Bayer2007-08-031-1/+1
| | | | unicode strings
* Remove unused mxDateTimeJason Kirtland2007-08-011-5/+0
|
* Stopgap for post- #646 and r3030, wedge in 0.3 Decimals-are-floats behavior ↵Jason Kirtland2007-08-011-3/+2
| | | | for vanilla 2.3 Python.
* - assurances that context.connection is safe to use by column default ↵Mike Bayer2007-07-311-2/+2
| | | | functions, helps proposal for [ticket:703]
* r/m information_schema from pgJonathan Ellis2007-07-291-163/+164
|
* engine.table_names()Jonathan Ellis2007-07-291-0/+3
| | | | tested vs sqlite and pg. mssql should also be ok (uses ischema like pg.) others are best-guess based on has_table code.
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-156/+137
| | | | maintenance branch in branches/rel_0_3.
* - fixed max identifier length on postgres (63) [ticket:571]Gaëtan de Menten2007-07-171-1/+1
| | | | | - fixed doc typo ("in_" operator) - misc indent stuff
* - more docsMike Bayer2007-07-151-1/+1
| | | | | - query will unique tupled results - fixed [ticket:605] which is for psycopg1 anyway...
* dont cache reflected domains, lookup each timeMike Bayer2007-07-121-4/+1
|
* postgres:Mike Bayer2007-06-291-4/+68
| | | | | | | | - added support for reflection of domains [ticket:570] - types which are missing during reflection resolve to Null type instead of raising an error - moved reflection/types/query unit tests specific to postgres to new postgres unittest module
* fix #624, modulo operator escaping on mysql and postgresAnts Aasma2007-06-261-0/+2
| | | | someone should test this with oracle, firebird and sql server also
* - the dialects within sqlalchemy.databases become a setuptoolsMike Bayer2007-04-171-9/+11
| | | | | | entry points. loading the built-in database dialects works the same as always, but if none found will fall back to trying pkg_resources to load an external module [ticket:521]
* - got unicode schemas to work with postgresMike Bayer2007-04-151-5/+5
| | | | | - unicode schema with mysql slightly improved, still cant do has_table - got reflection of unicode schemas working with sqlite, pg, mysql
* for #516, moved the "disconnect check" step out of pool and back into ↵Mike Bayer2007-04-031-12/+10
| | | | | | base.py. dialects have is_disconnect() method now. simpler design which also puts control of the ultimate "execute" call back into the hands of the dialects.
* - merged the patch from #516 + fixesMike Bayer2007-04-021-0/+13
| | | | | | | | - improves the framework for auto-invalidation of connections that have lost their underlying database - the error catching/invalidate step is totally moved to the connection pool. - added better condition checking for do_rollback() and do_commit() including SQLError excepetion wrapping
* - merged the "execcontext" branch, refactors engine/dialect codepathsMike Bayer2007-04-021-77/+61
| | | | | | | | | | | | | | | | | | | | - much more functionality moved into ExecutionContext, which impacted the API used by dialects to some degree - ResultProxy and subclasses now designed sanely - merged patch for #522, Unicode subclasses String directly, MSNVarchar implements for MS-SQL, removed MSUnicode. - String moves its "VARCHAR"/"TEXT" switchy thing into "get_search_list()" function, which VARCHAR and CHAR can override to not return TEXT in any case (didnt do the latter yet) - implements server side cursors for postgres, unit tests, #514 - includes overhaul of dbapi import strategy #480, all dbapi importing happens in dialect method "dbapi()", is only called inside of create_engine() for default and threadlocal strategies. Dialect subclasses have a datamember "dbapi" referencing the loaded module which may be None. - added "mock" engine strategy, doesnt require DBAPI module and gives you a "Connecition" which just sends all executes to a callable. can be used to create string output of create_all()/drop_all().
* latest #214 fixupsMike Bayer2007-03-311-1/+1
|
* thank you, SVN, for being completely idiotic and non-intutive. rolling back ↵Mike Bayer2007-03-301-5/+8
| | | | incorrect checkin to trunk
* current progress with exec branchMike Bayer2007-03-291-8/+5
|