简体   繁体   English

使用MonoCross,SQLite数据库的创建应该放在哪里?

[英]Using MonoCross, where should the creation of SQLite databases live?

Due to the differences in file structure etc. between platforms, I was wondering if the database creation (with connection strings) need to be platform specific? 由于平台之间文件结构等的差异,我想知道数据库创建(带有连接字符串)是否需要特定于平台? Or if there's maybe a way to create a database from OnAppLoad() platform agnostic? 或者,是否有一种方法可以通过与OnAppLoad()无关的平台创建数据库?

The SQLite file format is fully portable. SQLite文件格式是完全可移植的。

A database in SQLite is a single disk file. SQLite中的数据库是单个磁盘文件。 Furthermore, the file format is cross-platform. 此外,文件格式是跨平台的。 A database that is created on one machine can be copied and used on a different machine with a different architecture. 可以复制在一台计算机上创建的数据库,并在具有不同体系结构的另一台计算机上使用。 SQLite databases are portable across 32-bit and 64-bit machines and between big-endian and little-endian architectures. SQLite数据库可在32位和64位计算机之间以及在大端和小端架构之间移植。

You do not need to worry about it at all. 您完全不需要担心。 Things to worry about that are not platform related are few and can include the WAL journal-mode due to lack of backward compatibility. 与平台无关的事情很少担心,由于缺乏向后兼容性,可以包括WAL日记模式。

You can also read: 您还可以阅读:

http://www.sqlite.org/atomiccommit.html#sect_9_0 http://www.sqlite.org/atomiccommit.html#sect_9_0

and: 和:

http://www.sqlite.org/lockingv3.html#how_to_corrupt http://www.sqlite.org/lockingv3.html#how_to_corrupt

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

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