版本:1.1.0b2 |发布日期:2016年7月1日

SQLAlchemy 1.1文档

1.1更新日志

1.1.0b2 ¶ T0>

发布日期:2016年7月1日

SQL ¶ T0>

  • [sql] [bug] Fixed issue in SQL math negation operator where the type of the expression would no longer be the numeric type of the original. 这会导致类型确定结果集行为的问题。

    这个改变也被backported改为:1.0.14

    参考文献:#3735

  • [sql] [bug] Fixed bug whereby the __getstate__ / __setstate__ methods for sqlalchemy.util.Properties were non-working due to the transition in the 1.0 series to __slots__. 该问题可能会影响某些第三方应用程序。Pull请求Pieter Mulder提供。

    这个改变也被backported改为:1.0.14

    参考文献:#3728

  • [sql] [bug] 在纯Python和C-extensions版本之间,只有特征整数类型的后端Boolean数据类型所执行的处理已经变得一致, C-extension版本将接受来自数据库的任何整数值作为布尔值,而不仅仅是零和一;另外,发送到数据库的非布尔整型值被强制为0或1,而不是作为原始整数值传递。

    参考文献:#3730

  • [sql] [bug] 回滚Enum中的验证规则以允许未知字符串值通过,除非标志validate_string=TrueWhile the immediate use is to allow comparisons to enums with LIKE, the fact that this use exists indicates there may be more unknown-string-comparsion use cases than we expected, which hints that perhaps there are some unknown string-INSERT cases too.

    参考文献:#3725

的PostgreSQL ¶ T0>

  • [postgresql] [bug] [ext] Made a slight behavioral change in the sqlalchemy.ext.compiler extension, whereby the existing compilation schemes for an established construct would be removed if that construct was itself didn’t already have its own dedicated __visit_name__. 这在1.0中很少见,但在1.1 postgresql.ARRAY子类sqltypes.ARRAY中有此现象。因此,为另一种方言(如SQLite)设置编译处理程序会使主postgresql.ARRAY对象不再可编译。

    参考文献:#3732

MySQL的¶ T0>

1.1.0b1 ¶ T0>

发布日期:2016年6月16日

ORM ¶ T0>

发动机¶ T0>

  • [engine] [feature] Added connection pool events ConnectionEvents.close(), ConnectionEvents.detach(), ConnectionEvents.close_detached().

  • [engine] [feature] 用于日志记录,异常和repr()目的的绑定参数集和结果行的所有字符串格式现在会截断每个集合中非常大的标量值,包括“N个字符截断”符号,类似于大型多参数集的显示如何被截断。

    参考文献:#2837

  • [engine] [feature] 添加了Table对象的多租户模式转换。这支持在许多模式中使用同一组Table对象的应用程序的用例,例如schema-per-user。添加新的执行选项Connection.execution_options.schema_translate_map

    参考文献:#2685

  • [engine] [feature] 为引擎添加了一个新的入口点系统,以允许在URL的查询字符串中声明“插件”。可以编写自定义插件,预先给予机会改变和/或使用引擎的URL和关键字参数,然后在引擎创建时将给引擎本身以允许进行额外的修改或事件注册。插件被编写为CreateEnginePlugin的子类;详情请参见该课程。

    参考文献:#3536

SQL ¶ T0>

架构¶ T0>

  • [schema] [enhancement] 传递给Column对象的默认生成函数现在通过“update_wrapper”运行,或者在传递可调用非函数时通过等效函数运行内省工具保留了包装函数的名称和文档字符串。请求礼貌hsum。

    参考文献:请求github:204

的PostgreSQL ¶ T0>

MySQL的¶ T0>

源码¶ T0>

MSSQL ¶ T0>

杂项¶ T0>

  • [feature] [ext] MutableSetMutableList辅助类添加到Mutation Tracking扩展中。请求Jeong YunWon提供。

    参考文献:#3297

  • [bug] [ext] The docstring specified on a hybrid property or method is now honored at the class level, allowing it to work with tools like Sphinx autodoc. 这里的机制必然涉及混合属性的表达式的一些包装,这可能导致它们使用内省而出现不同。

    参考文献:#3653

  • [bug] [sybase] 尝试编译包含“offset”的查询时,不支持的Sybase方言现在引发NotImplementedError; Sybase没有直接的“偏移”功能。

    参考文献:#2278