GNOME Bugzilla – Bug 507072
Symbol db does not handle ianjuta_symbol_manager_search() correctly
Last modified: 2008-07-02 11:18:30 UTC
* search not case-sensitive * partial = FALSE should only give exact matches and no partial ones
I fixed on my local copy the case-sensitive issue. It was a PRAGMA to give to the database. About the ianjuta_symbol_manager_search() interface: I saw that IAnjutaSymbolField isn't used anywhere in Anjuta. IMHO IAnjutaSymbol isn't a good interface for symbol-db. It supposes to have all the fields available to retrieve the scope (), the name (), the inheritance () etc. While this is right for a tm_tagmanager structure, this isn't for symbol-db. Infact every info is stored in database but in different tables and so for every ISymbol we would need a big join with many tables, which may slow down the entire process of querying. What I would like to see in the interface is very similar to what happens now in SymbolDBEngineIteratorNode and SymbolDBEngineIterator, i.e. to give always some base functions like symbol_db_engine_iterator_node_get_symbol_name (), symbol_db_engine_iterator_node_get_symbol_file_pos () etc which are directly retrieverable from 'symbol' table, and extra functions in a way like symbol_db_engine_iterator_node_get_symbol_extra_string (). I would like to change IAnjutaSymbolField to something like SymExtraInfo on symbol-engine.h. Search function can then be similar to: IAnjutaIterable* search (IAnjutaSymbolType match_types, IAnjutaSymbolField info_fields, const gchar *match_name, gboolean partial_name_match, gboolean global_search); where on 'info_fields' parameter you insert the extra info you want to know [e.g. the number of joins to do on database]. If it's ok for you I'll procede with new interface and then do the appropriate changes on the plugins that use this plugin. regards, Massimo
Should be fixed with the patch given at comment #80 on bug #358479. Let me know, in case I'll close this one. regards, Massimo