Hi, guys, On Tue, Jun 19, 2018 at 4:37 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, Ryan, > > On Tue, Jun 19, 2018 at 3:22 PM, R Smith <ryansmit...@gmail.com> wrote: >> >> On 2018/06/19 8:26 PM, Igor Korot wrote: >>> >>> Hi, >>> Is there a C API which checks if the new table has been created? >> >> >> We could break this down into a few separate questions: >> >> 1 - Is there a C API that can return SQL query answers? >> YES there is. >> >> 2 - Can I ask this API in SQL if the Schema changed, since >> altering/adding/deleting a table involves schema changes? >> YES you can. [I see this pragma schema_version is already mentioned in other >> replies] >> >> 3 - Once I know the schema changed, can I ask for a list of tables to >> compare to my predefined/pre-loaded/cached list to know WHICH tables were >> changed/added/deleted? >> YES you can: [pragma table_info] >> >> 4 - Can I use all of the above to update my cached table list and refresh >> interfaces as needed? >> Well, technically that's up to your mad skillz as a programmer, but having >> seen your posts many times before, I'm going to bet on: YES, you can. >> >> 5 - Is there a C-API that does all of the above in one go for me? >> I'm afraid NOT. > > Thank you. > This post summarizes it all. > > I'll follow thru when I get back home.
One more question: I presume I should call PRAGMA schema_version right after connection has been made, cache the value returned and then create a secondary thread which will call this query continuously. Am I right? Thank you. > > >> >> >> Good luck! >> Ryan >> >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users