summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
Commit message (Collapse)AuthorAgeFilesLines
* - Got PG server side cursors back into shape, added fixedMike Bayer2008-04-021-9/+14
| | | | | | | unit tests as part of the default test suite. Added better uniqueness to the cursor ID [ticket:1001] - update().values() and insert().values() take keyword arguments.
* - Revamped the Connection memoize decorator a bit, moved to engineJason Kirtland2008-04-021-2/+2
| | | | | - MySQL character set caching is more aggressive but will invalidate the cache if a SET is issued. - MySQL connection memos are namespaced: info[('mysql', 'server_variable')]
* - reverted previous "strings instead of tuples" change due to more specific ↵Mike Bayer2008-03-301-2/+3
| | | | | | test results showing tuples faster - changed cache decorator call on default_schema_name call to a connection.info specific one
* some cache decorator calls...Mike Bayer2008-03-301-4/+3
|
* - like() and ilike() take an optional keyword argumentMike Bayer2008-03-191-2/+2
| | | | | | "escape=<somestring>", which is set as the escape character using the syntax "x LIKE y ESCAPE '<somestring>'" [ticket:993]
* check for NoneMike Bayer2008-03-041-1/+3
|
* - postgres PGArray is a "mutable" type by default;Mike Bayer2008-03-041-2/+15
| | | | | when used with the ORM, mutable-style equality/ copy-on-write techniques are used to test for changes.
* - postgres TIMESTAMP renders correctly [ticket:981]Mike Bayer2008-02-271-0/+7
|
* - added exception wrapping/reconnect support to result setMike Bayer2008-02-251-1/+1
| | | | | | fetching. Reconnect works for those databases that raise a catchable data error during results (i.e. doesn't work on MySQL) [ticket:978]
* - Oracle and others properly encode SQL used for defaultsMike Bayer2008-01-301-1/+1
| | | | | | like sequences, etc., even if no unicode idents are used since identifier preparer may return a cached unicode identifier.
* fixed NOT ILIKEMike Bayer2008-01-111-1/+2
|
* - added "ilike()" operator to column operations.Mike Bayer2008-01-111-1/+2
| | | | | compiles to ILIKE on postgres, lower(x) LIKE lower(y) on all others [ticket:727]
* - Warnings are now issued as SAWarning instead of RuntimeWarning; ↵Jason Kirtland2008-01-111-2/+3
| | | | | | util.warn() wraps this up. - SADeprecationWarning has moved to exceptions. An alias remains in logging until 0.5.
* Include column name in length-less String warning (more [ticket:912])Jason Kirtland2008-01-101-28/+28
|
* - finally added PGMacAddr type to postgresMike Bayer2008-01-101-0/+5
| | | | [ticket:580]
* redid the _for_ddl String/Text deprecation warning correctly [ticket:912]Mike Bayer2008-01-091-2/+2
|
* - changed name of TEXT to Text since its a "generic" type; TEXT name isMike Bayer2008-01-051-2/+2
| | | | | | | deprecated until 0.5. The "upgrading" behavior of String to Text when no length is present is also deprecated until 0.5; will issue a warning when used for CREATE TABLE statements (String with no length for SQL expression purposes is still fine) [ticket:912]
* fix not calling the result processor of PGArray subtypes. (a rather ↵Ants Aasma2008-01-031-1/+1
| | | | embarrasing copypaste error) [ticket:913]
* happy new yearMike Bayer2008-01-011-1/+1
|
* 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