FunctionWithCollation 单元测试因 System.Data.Sqlite 失败
我下载了 SqlLite 3.7.3 和 据称 最好的 .NET该数据库引擎的包装器。我将它们放在同一目录中并运行它们提供的 test.exe。
大多数测试成功,但有两次失败。 FunctionWithCollation 失败,并出现 SQLite 错误“没有这样的函数:CHARINDEX”,FunctionWithCollation2 失败,出现“该方法或操作未实现”。
支持网站保持沉默,谷歌也是如此。有人知道这意味着什么吗?如果有的话我应该如何进行?
I downloaded SqlLite 3.7.3 and allegedly the best .NET wrapper for this database engine. I put them in the same directory and ran their provided test.exe.
Most tests succeeded, but two failed. FunctionWithCollation failed with SQLite error "no such function: CHARINDEX" and FunctionWithCollation2 failed with "The method or operation is not implemented".
The support site is silent and so is google. Does anybody have an idea what that means, and how if at all should I proceed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,最好提及
FunctionWithCollation
和FunctionWithCollation2
的作用,这样可以更容易地看到发生了什么。AFAIK sqlite3 不支持内置排序规则,因为这是一件非常困难的事情,并且允许您插入自己的排序规则功能: http://www.sqlite.org/c3ref/create_collation.html,据我所知有一些基于 ICU 的排序提供程序。
因此,如果不需要您添加一些插件等,请检查此方向。
编辑:从快速浏览到源代码,单元测试对 charindex 函数进行了一些测试。这个函数是扩展,所以:
First of all it would be very good to mention what are
FunctionWithCollation
andFunctionWithCollation2
do so it would be easier to see what happens.AFAIK sqlite3 does not support collation built-in as it is quite hard thing to do and allows you to plug in your own collation functionality: http://www.sqlite.org/c3ref/create_collation.html, AFAIK there are some ICU based collation providers.
So check this direction if it does not require you do add some plugin or so.
EDIT: From quick glance to the source code, the unit tests do some testing on charindex function. This function is extension, so: