版本: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扩展版本将接受来自数据库的任何整数值作为布尔值,而不仅仅是零和一;此外,发送到数据库的非布尔整型值被强制为0或1,而不是作为原始整数值传递。

    参考文献:#3730

  • [sql] [bug] Enum中稍微回滚一下验证规则,以允许未知的字符串值通过,除非flag 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] All string formatting of bound parameter sets and result rows for logging, exception, and repr() purposes now truncate very large scalar values within each collection, including an “N characters truncated” notation, similar to how the display for large multiple-parameter sets are themselves truncated.

    参考文献:#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] The default generation functions passed to Column objects are now run through “update_wrapper”, or an equivalent function if a callable non-function is passed, so that introspection tools preserve the name and docstring of the wrapped function. 拉请求礼貌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] The unsupported Sybase dialect now raises NotImplementedError when attempting to compile a query that includes “offset”; Sybase has no straightforward “offset” feature.

    参考文献:#2278