我正在试用 Couchbase Lite 库,我正在按照以下步骤操作:
我不明白如何创建本地数据库。无论我在尝试什么 - 我得到: Message=无效的数据库名称:
我尝试过不同的方法:
DirectoryInfo info = new DirectoryInfo("c:/");
Manager mgr = new Manager(info, ManagerOptions.Default);
var db = mgr.GetDatabase(dbName);
或
var db = Manager.SharedInstance.GetDatabase(dbName);
GetDatabase 文档:
Returns the Couchbase.Lite.Database with the given name. If the Couchbase.Lite.Database // does not already exist, it is created.
- 教程中没有提供 C# 代码示例...
为什么它不起作用?
最佳答案
是的,Couchbase Lite 的命名规则有点特殊。原因是 Couchbase Lite 受多种平台支持,但并非所有平台都以相同方式处理大小写和特殊字符。
可以在此处的文档中找到命名规则: http://developer.couchbase.com/documentation/mobile/current/develop/guides/couchbase-lite/native-api/database/index.html
The name must consist only of lowercase ASCII letters, digits, and the special characters _$()+-/
关于c# - Couchbase Lite 数据库创建 C# .NET,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33803221/