Subsonic 中的 SqLite Blob 类型等效吗?
在一个 SqLite 表中,我有一个 BLOB 列用于保存图像(实际上是二进制数据)。该表是文档。
奇怪的是,在 Subsonic 的 ActiveRecord 的 Documents 类中,该列的类型显示为 STRING,这是没有意义的。它应该是字节数组。正确的?
我在这里缺少什么?如何在 Subsonic 中映射 SqLite BLOB 列?
In one SqLite table, I have a BLOB column for saving images (or binary data as a matter of fact). The table is Documents.
Strangely, in Subsonic's ActiveRecord's Documents class, the type of that column shows as STRING which doesn't make sense. It should be byte array. Right?
What am I missing here? How do I map SqLite BLOB column in Subsonic?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不管你相信与否,SQLite 没有类型列。任何数据都可以存储在任何列中(INTEGER PK 除外),无论该列是如何声明的。每列都有一个“关联性”,这就是向查询该列数据类型的前端报告的内容。在 SQLite 中,BLOB 列的关联性以 TEXT 形式返回。
您可以在此处阅读更多相关信息。
SQLite, believe it or not, does not have typed columns. Any data can be stored in any column (except INTEGER PK), regardless of how that column was declared. Each column has an "affinity", and that's what's reported to front ends that query the column's data type. In SQLite, the affinity for a BLOB column is returned as TEXT.
You can read more about it here.