summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mssql
Commit message (Collapse)AuthorAgeFilesLines
* some tests, should be OKMike Bayer2010-12-131-3/+5
|
* - support for cdecimalMike Bayer2010-12-112-9/+19
| | | | | | | | | | | | | | | | | | - add --with-cdecimal flag to tests, monkeypatches cdecimal in - fix mssql/pyodbc.py to not use private '_int' accessor in decimal conversion routines - pyodbc version 2.1.8 is needed for cdecimal in any case as previous versions also called '_int', 2.1.8 adds the same string logic as our own dialect, so that logic is skipped for modern pyodbc version - make the imports for "Decimal" consistent across the whole lib. not sure yet how we should be importing "Decimal" or what the best way forward is that would allow a clean user-invoked swap of cdecimal; for now, added docs suggesting a global monkeypatch - the two decimal libs are not compatible with each other so any chance of mixing produces serious issues. adding adapters to DBAPIs tedious and adds in-python overhead. suggestions welcome on how we should be doing Decimal/cdecimal.
* - repair MS-SQL handling of LIMIT/OFFSET as binds, add bindparam() to the ↵Mike Bayer2010-11-291-4/+4
| | | | | | compile stream so they function correctly
* merge tipMike Bayer2010-11-143-26/+61
|\
| * - mssql+pymssql dialect now honors the "port" portionMike Bayer2010-10-241-2/+4
| | | | | | | | | | of the URL instead of discarding it. [ticket:1952] - testing.only_on() accepts db specs optionally as a list
| * - Rewrote the reflection of indexes to use sys.Mike Bayer2010-10-232-15/+48
| | | | | | | | | | | | | | catalogs, so that column names of any configuration (spaces, embedded commas, etc.) can be reflected. Note that reflection of indexes requires SQL Server 2005 or greater. [ticket:1770]
| * - Fixed bug where aliasing of tables with "schema" wouldMike Bayer2010-10-201-3/+3
| | | | | | | | fail to compile properly. [ticket:1943]
| * - Fixed MSSQL reflection bug which did not properly handleMike Bayer2010-10-161-6/+6
| | | | | | | | reflection of unknown types. [ticket:1946]
* | merge tipMike Bayer2010-09-191-1/+1
|\ \ | |/
| * - rewrote the "connections" sectionMike Bayer2010-09-051-1/+1
| | | | | | | | | | | | | | | | | | - improved pool docs - typos etc. - ClauseElement.execute() and scalar() make no sense - these are depreacted. The official home is Executable. - alias() is not executable, allowing it is sloppy so this goes under the deprecated umbrella
* | - move LIMIT/OFFSET rendering to be as bind parameters, for all backendsMike Bayer2010-08-291-4/+7
|/ | | | | | | | | | which support it. This includes SQLite, MySQL, Postgresql, Firebird, Oracle (already used binds with ROW NUMBER OVER), MSSQL (when ROW NUMBER is used, not TOP). Not included are Informix, Sybase, MaxDB, Access [ticket:805] - LIMIT/OFFSET parameters need to stay as literals within SQL constructs. This because they may not be renderable as binds on some backends.
* reformatting /cleanup of column type docs, including [ticket:1858]Mike Bayer2010-08-011-4/+8
|
* - Fixed "default schema" query to work withMike Bayer2010-07-291-4/+4
| | | | pymssql backend.
* - Changed the scheme used to generate truncatedMike Bayer2010-07-211-1/+1
| | | | | | | | | | | | "auto" index names when using the "index=True" flag on Column. The truncation only takes place with the auto-generated name, not one that is user-defined (an error would be raised instead), and the truncation scheme itself is now based on a fragment of an md5 hash of the identifier name, so that multiple indexes on columns with similar names still have unique names. [ticket:1855]
* - idle 78-char adjustmentsMike Bayer2010-07-038-102/+177
|
* - If server_version_info is outside the usualMike Bayer2010-07-021-0/+10
| | | | | | | range of (8, ), (9, ), (10, ), a warning is emitted which suggests checking that the FreeTDS version configuration is using 7.0 or 8.0, not 4.2. [ticket:1825]
* documentation updatesMike Bayer2010-03-283-3/+44
|
* - pymssql now works again, expecting at least the 1.0 series.Mike Bayer2010-03-204-129/+135
|
* try < 0Mike Bayer2010-03-191-2/+2
|
* re-split PyODBCNumeric among Sybase and MS-SQL, they can't be shared.Mike Bayer2010-03-191-3/+53
| | | | | MS-SQL really needs the pure string approach else crashes occur on windows.
* removed all dialect table_names() methods and standardizedMike Bayer2010-03-192-11/+6
| | | | on get_table_names(). [ticket:1739]
* still poking at numericsMike Bayer2010-03-191-1/+2
|
* switching Decimal treatment in MSSQL to be pyodbc specific, addedMike Bayer2010-03-193-72/+27
| | | | | | to connector to share between sybase/mssql. Going with turning decimals with very low significant digit to floats, seems to work so far.
* fixed missing return statement which caused render_literal_value to chokeBrad Allen2010-03-181-1/+1
|
* Added MSSQLStrictCompiler support for rendering datetime typesBrad Allen2010-03-181-3/+17
|
* Added module docstring for mssql+mxodbc dialect.Brad Allen2010-03-181-1/+10
|
* Removed MxNumeric and MxFloat because now the sqlalchemy.types base classes ↵Brad Allen2010-03-181-12/+10
| | | | support dialects having a class attribute of "supports_native_decimal" indicating native Python Demimal support. Adjusted mssql+mxodbc to use the sqlalchemy.types base classes for Float and Numeric instead of using the base mssql dialect's numeric types.
* adjustments to improve readability (indentation to complex conditional ↵Brad Allen2010-03-181-23/+59
| | | | expressions, excessively long lines brokenup). This is only a partial cleanup.
* Hardcoded ident_seed and ident_increment query had bind markers noncompliant ↵Brad Allen2010-03-181-5/+3
| | | | with SQL-92, which caused mxODBC failures. This was corrected by using string substitution in building the statement, and removing the bind params.
* Merged from main tip.Brad Allen2010-03-181-19/+6
|\
| * turning the decimals to floats allows the E notation to work with ↵Mike Bayer2010-03-181-1/+2
| | | | | | | | sybase+pyodbc for small E notations
| * - moved most Decimal bind/result handling into types.py, out of sqlite, ↵Mike Bayer2010-03-181-19/+5
| | | | | | | | | | | | | | mysql dialects. - added an explicit test for [ticket:1216] - some questions remain about MSSQL - would like to simplify/remove bind handling for numerics
* | MergeBrad Allen2010-03-181-4/+6
|\ \ | |/
| * some ms fixesMike Bayer2010-03-171-4/+6
| |
* | Merged from main tip, and resolved conflicts in mxodbc dialect and connector.Brad Allen2010-03-173-23/+59
|\ \ | |/
| * - added pyodbc for sybase driver.Mike Bayer2010-03-173-9/+59
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - generalized the "freetds" / "unicode statements" behavior of MS-SQL/pyodbc into the base Pyodbc connector, as this seems to apply to Sybase as well. - generalized the python-sybase "use autocommit for DDL" into the pyodbc connector. With pyodbc, the "autocommit" flag on connection is used, as Pyodbc seems to have more database conversation than python-sybase that can't otherwise be suppressed. - Some platforms will now interpret certain literal values as non-bind parameters, rendered literally into the SQL statement. This to support strict SQL-92 rules that are enforced by some platforms including MS-SQL and Sybase. In this model, bind parameters aren't allowed in the columns clause of a SELECT, nor are certain ambiguous expressions like "?=?". When this mode is enabled, the base compiler will render the binds as inline literals, but only across strings and numeric values. Other types such as dates will raise an error, unless the dialect subclass defines a literal rendering function for those. The bind parameter must have an embedded literal value already or an error is raised (i.e. won't work with straight bindparam('x')). Dialects can also expand upon the areas where binds are not accepted, such as within argument lists of functions (which don't work on MS-SQL when native SQL binding is used).
| | * - mxodbc can use default execute() callMike Bayer2010-03-162-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - modified SQLCompiler to support rendering of bind parameters as literal inline strings for specific sections, if specified by the compiler subclass, using either literal_binds=True passed to process() or any visit method, or by setting to False the "binds_in_columns_clause" flag for SQL-92 compatible columns clauses.. The compiler subclass is responsible for implementing the literal quoting function which should make use of the DBAPI's native capabilities. - SQLCompiler now passes **kw to most process() methods (should be all, ideally) so that literal_binds is propagated. - added some rudimentary tests for mxodbc.
| * | - basic sybase+pyodbc support. in particular this will impact freetds ↵Mike Bayer2010-03-171-15/+0
| |/ | | | | | | detection for MS-SQL as well.
* | corrected import statements forgotten on prior commitBrad Allen2010-03-161-1/+2
| |
* | Fixes to pass numeric tests; now by default, the mxodbc connector natively ↵Brad Allen2010-03-161-0/+8
|/ | | | returns Python Decimal data types from columns of type SQL.NUMERIC or SQL.DECIMAL
* merged mainline default branchBrad Allen2010-03-151-5/+5
|\
| * - name all the "sub" dialect components <DB><component>_<dialectname>, ↵Mike Bayer2010-03-141-5/+5
| | | | | | | | [ticket:1738]
* | Merged latest changes from the mainline (default branch)Brad Allen2010-03-121-3/+3
|\ \ | |/
| * Added a non-freetds specific exclusion for pyodbcMike Bayer2010-03-111-3/+3
| |
* | Now using pyodbc execution context once again (to pass the test involving ↵Brad Allen2010-03-111-2/+9
| | | | | | | | insert to trigger table)
* | Removed pyodbc execution context, because output inserted is now handled by ↵Brad Allen2010-03-081-3/+2
|/ | | | the base. No more need for SELECT SCOPE_IDENTITY().
* - the execution sequence pulls all rowcount/last inserted IDMike Bayer2010-02-282-14/+6
| | | | | | | | info from the cursor before commit() is called on the DBAPI connection in an "autocommit" scenario. This helps mxodbc with rowcount and is probably a good idea overall. - cx_oracle wants list(), not tuple(), for empty execute. - cleaned up plain SQL param handling
* mxodbc supports rowcount, just have to snag before the cursor is closed.Mike Bayer2010-02-282-6/+15
|
* some ms/odbc fixesMike Bayer2010-02-281-2/+2
|
* further numeric fixesMike Bayer2010-02-271-3/+9
|