简体   繁体   English

Flask-SQLAlchemy数据类型

[英]Flask-SQLAlchemy data types

I'm starting to use the Flask-SQLAlchemy package in my web project and am wondering about the data type usage. 我开始在我的Web项目中使用Flask-SQLAlchemy包,并且想知道数据类型的用法。 It appears that the package can use any of the SQL standard types , but also seems to have a few of it's own ( String ) that are likely recasts of one of the standard types. 似乎该程序包可以使用任何SQL标准类型 ,但似乎也有一些它自己的( String ),很可能是其中一种标准类型的重铸。 The notation difference to distinguish these seems to be caps ( INTEGER ) for the standard types and a starting cap ( Integer ) for the package specific types. 区分这些的符号差异似乎是标准类型的大写( INTEGER )和特定于软件包类型的起始大写( Integer )。

Does anyone know where they do an overview of all the permissible types - I'm mainly interested in understanding the package specific ones and their characteristics. 有谁知道他们在哪里对所有允许的类型进行了概述-我主要是想了解特定于软件包的类型及其特性。 I've been reading the documentation, and may have missed it. 我一直在阅读文档,可能已经错过了。 Otherwise, I know I can just keep it simple and use all standard types. 否则,我知道我可以保持简单并使用所有标准类型。

您在文档的右侧,只需要跳到Column and Datatypes-Generic Types文档即可

This page provides an overview of the types implemented in SQLAlchemy. 页面概述了在SQLAlchemy中实现的类型。

You can also use the flask-sqlalchemy.SQLAlchemy class to look through the available data types. 您也可以使用flask-sqlalchemy.SQLAlchemy类浏览可用的数据类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM