sqlite - 如何使用 SQLite 3 类型亲和性?

标签 sqlite

根据 SQLite 3 documentation说它具有“类型亲和性”功能来强制执行列数据类型。但是如何开启呢?

最佳答案

类型亲和性不会强制列数据类型 - 它只是就底层存储引擎如何存储数据提出建议。

在“类型亲和性”部分下:

The type affinity of a column is the recommended type for data stored in that column. The important idea here is that the type is recommended, not required. Any column can still store any type of data.

(强调)

就“如何打开它”而言,没有这样的事情。这就是 SQLite 一直以来的工作方式。要获得此功能,无需打开或关闭任何内容。

关于sqlite - 如何使用 SQLite 3 类型亲和性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10059500/

相关文章:

c# - Dapper:字符串未被识别为有效的日期时间

android - 我如何获取有关 SQLite 中外键的信息?

windows - 来自命令提示符的 sqlite - 无法识别的命令

linux - 在 shell 脚本中从 places.sqlite 中的 moz_places 检索数据

ruby-on-rails - 具有自定义功能的 Ruby on Rails 应用程序的 Heroku 部署

java - getApplicationContext() 返回 null,但在其他 Activity 中有效

sql - 如何将sqlite打印到utf-8文件中?

.net - 使用 SQLite 和 WinForms 2.0 C# 的编码问题

android - HashMap<String, String> 和其他到 SQLiteDataBase

iphone - iPhone 上的 sqlite3 - 内存被吞噬?解析大量xml数据时