sqlite - ServiceStack Ormlite发出Sqlite特定命令

标签 sqlite ormlite-servicestack

我正在针对sqlite数据库运行Ormlite。爱它。
我正在添加和删除大量记录,并发现该数据库在偶尔使用Vacuum命令的情况下运行良好。
如何在ormlite API上发布此消息?

TIA

最佳答案

您可以使用db.ExecuteSql() API执行自定义SQL,例如:

Db.ExecuteSql("INSERT INTO page_stats (ref_id, fav_count) VALUES (@refId, @favCount)",
    new { refId, favCount })

关于sqlite - ServiceStack Ormlite发出Sqlite特定命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51887468/

相关文章:

python - Sqlite3 数据库正在添加不应添加的条目

iphone - sqlite3选择查询在IOS6中挂起

java - 如何在数据库中正确添加图像和字符串?

c# - ServiceStack:测试 OrmLite,与 NuGet 一起安装但出现错误 "FileNotFoundException"

mysql - ServiceStack.OrmLite : Inserting or updating columns that are not represented in the POCO?

ios - 如何从sqlite中获取数据到数组中

android - 在Phonegap SQLite中根据之前的查询结果进行查询

servicestack - Ormlite Where-Contains 失败

ServiceStack Ormlite SqlExpressionVisitor null 检查 Where 扩展名

servicestack - ServiceStack OrmLite 中 QueryById() 和 GetById() 的区别