Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create virtual table using rtree module #279

Open
MelodyD opened this issue Apr 10, 2019 · 12 comments
Open

create virtual table using rtree module #279

MelodyD opened this issue Apr 10, 2019 · 12 comments

Comments

@MelodyD
Copy link

MelodyD commented Apr 10, 2019

hi,
i want create a virtual table by using rtree moudle.what should i do?

CREATE VIRTUAL TABLE table_demo USING rtree(id, minX, maxX, minY, maxY, +rowid INTEGER);

@fnc12
Copy link
Owner

fnc12 commented Apr 10, 2019

Hi. Looks like that first you need to register a rtree module. How do you expect to do it?

@MelodyD
Copy link
Author

MelodyD commented Apr 10, 2019

Hi. Looks like that first you need to register a rtree module. How do you expect to do it?

I have already registered rtree module and created virtual table succeeded by using CREATE VIRTUAL TABLE table_demo USING rtree(id, minX, maxX, minY, maxY, +rowid INTEGER);
But i don't konw how to use this lib to do that, dose this lib support it?i like this lib

@fnc12
Copy link
Owner

fnc12 commented Apr 10, 2019

You know sometimes it happens when someone tells me about some SQLite feature I have never heard about. This case is exactly the same. I've never header about creating modules. So there is no such a feature. But I want to add it cause it looks pretty and useful. To understand it I need some example of modules creation and virtual table using in raw SQLite. There is not so much info in google. Could you please provide some? Thanks

@MelodyD
Copy link
Author

MelodyD commented Apr 10, 2019

thank you for your reply.my English is not good,sorry.
you can get some info from this: https://sqlite.org/rtree.html
this module can make sqlite create rtree index. it's a special index that is designed for doing range queries.usually used in Geographic Information System application.
there also some other kind modules that i don't konw mush.

@fnc12
Copy link
Owner

fnc12 commented Apr 11, 2019

VIRTUAL TABLE looks like a very useful and very large feature. It is very interesting and useful to add it to sqlite_orm. I need to know more about it. I'm reading docs https://www.sqlite.org/fts3.html then I shall be able to tell you how and when I am going to implement it. It may not be so quickly cause I have primary job also which takes most of my time. Thanks for understanding.
Also if you have some ideas about syntax please feel free to paste it here. Thanks again

@fnc12 fnc12 added this to the Extensions milestone Jul 14, 2019
@fnc12 fnc12 changed the title create virtual table using rtree moudle create virtual table using rtree module Aug 13, 2019
@spiritEcosse
Copy link

Hello, as i understand virtual table will help with full text search ?

@fnc12
Copy link
Owner

fnc12 commented Nov 8, 2021

@spiritEcosse hello. I did not understand your question and why are asking it here. Do you want to implement full text search or coordinates search?

@spiritEcosse
Copy link

Sorry, i thought this issue related with full text search.
Like in this article we can see support full text search.
https://www.sqlite.org/fts5.html

@spiritEcosse
Copy link

maybe it is worth creating a separate issue?

@fnc12
Copy link
Owner

fnc12 commented Nov 9, 2021

there is already one #622

@fnc12
Copy link
Owner

fnc12 commented Oct 10, 2023

FTS is implemented in dev branch. So the common mechanism of virtual tables in sqlite_orm is created. Soon I'll start implement rtree as well

@fnc12
Copy link
Owner

fnc12 commented Oct 23, 2023

@MelodyD do you have some example SQL code you would like sqlite_orm to support within RTree? I may help us adding unit tests and examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants