Python百日进阶-Web开发-PeeweeDay287 - Peewee 的扩展(六)字段
发布时间
阅读量:
阅读量
文章结构概览
-
- 13.10 数据字段
-
-
- class CompressedField
-
-
class PickleField
-
13.11 混合属性 Hybrid Attributes
-
- 13.11.1 混合 API
-
- class hybrid_method
-
class hybrid_property
-
13.12 键值存储 Key/Value Store
-
-
- class KeyValue
-
-
- 13.10 数据字段
13.10 字段
这些字段所对应的内容可于playhouse.fields模块中进行查找。
class CompressedField
class CompressedField([compression_level=6[, algorithm='zlib'[, **kwargs]]])
参数:
- compression_level ( int ) – 取值范围为 0 至 9。
- algorithm( str ) – 仅可选用’zlib’或’bz2’两种选项。
通过选定的算法对数据进行压缩存储。此字段继承自 BlobField,能够自动将数据库中的数据以压缩形
全部评论 (0)
还没有任何评论哟~
