简体   繁体   English

如何在sqlite中创建虚拟表并进行访问?

[英]how to work create virtual table in sqlite and access?

I am working with sqlite in iphone application. 我在iPhone应用程序中使用sqlite。 what i want to do is like i will get the data from data base using "select * from tablename". 我想要做的就像我将使用“ select * from tablename”从数据库中获取数据一样。 but i don't want to access all the rows at a time. 但我不想一次访问所有行。 I know that we can use cursor for this. 我知道我们可以为此使用游标。 I know how to write them in MySql procedures. 我知道如何在MySql过程中编写它们。 but I want it to be implemented in my app. 但我希望在我的应用中实现它。 [Virtual table]http://www.sqlite.org/vtab.html#xconnect here they explained like we have to create virtual table to use cursor. [虚拟表] http://www.sqlite.org/vtab.html#xconnect在这里,他们解释说我们必须创建虚拟表才能使用游标。 so if any body worked with this can you explain me how to do that with some coding example... 因此,如果有人对此进行了工作,您可以通过一些编码示例来说明如何做到这一点...

I believe you're trying too hard. 我相信您正在努力。 SQLite only fetches one row at a time. SQLite一次只获取一行。 There is a function call that will obtain all the rows, but the documentation specifically states what it is doing. 有一个函数调用将获取所有行,但是文档专门说明了它在做什么。

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

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