File: db-find.el.html

Databases of various forms can all be searched. There are a few types of searches that can be done:

  Basic Name Search:
   These searches scan a database table collection for tags based
   on name.

  Basic Attribute Search:
   These searches allow searching on specific attributes of tags,
   such as name, type, or other attribute.

  Advanced Search:
   These are searches that were needed to accomplish some
   specialized tasks as discovered in utilities. Advanced searches
   include matching methods defined outside some parent class.

   The reason for advanced searches are so that external
   repositories such as the Emacs obarray, or java .class files can
   quickly answer these needed questions without dumping the entire
   symbol list into Emacs for additional refinement searches via
   regular semanticdb search.

How databases are decided upon is another important aspect of a database search. When it comes to searching for a name, there are these types of searches:

  Basic Search:
   Basic search means that tags looking for a given name start
   with a specific search path. Names are sought on that path
   until it is empty or items on the path can no longer be found.
   Use semanticdb-dump-all-table-summary to test this list.
   Use semanticdb-find-throttle-custom-list to refine this list.

  Deep Search:
   A deep search will search more than just the global namespace.
   It will recurse into tags that contain more tags, and search
   those too.

  Brute Search:
   Brute search means that all tables in all databases in a given
   project are searched. Brute searches are the search style as
   written for semantic version 1.x.

How does the search path work?

 A basic search starts with three parameters:

    (FINDME &optional PATH FIND-FILE-MATCH)

 FINDME is key to be searched for dependent on the type of search.
 PATH is an indicator of which tables are to be searched.
 FIND-FILE-MATCH indicates that any time a match is found, the
 file associated with the tag should be read into a file.

 The PATH argument is then the most interesting argument. It can
 have these values:

   nil - Take the current buffer, and use its include list
   buffer - Use that buffer's include list.
   filename - Use that file's include list. If the file is not
       in a buffer, see of there is a semanticdb table for it. If
       not, read that file into a buffer.
   tag - Get that tag's buffer of file file. See above.
   table - Search that table, and its include list.

Search Results:

  Semanticdb returns the results in a specific format. There are a
  series of routines for using those results, and results can be
  passed in as a search-path for refinement searches with
  semanticdb. Apropos for semanticdb.*find-result for more.

Application:

Here are applications where different searches are needed which exist as of semantic 1.4.x

eldoc - popup help
  => Requires basic search using default path. (Header files ok)
tag jump - jump to a named tag
  => Requires a brute search using whole project. (Source files only)
completion - Completing symbol names in a smart way
  => Basic search (headers ok)
type analysis - finding type definitions for variables & fcns
  => Basic search (headers ok)
Class browser - organize types into some structure
  => Brute search, or custom navigation.

TODO:
 During a search, load any unloaded DB files based on paths in the
 current project.

Defined variables (7)

semanticdb-find-default-throttleThe default throttle for ‘semanticdb-find’ routines.
semanticdb-find-log-buffer-nameThe name of the logging buffer.
semanticdb-find-log-flagNon-nil means log the process of searches.
semanticdb-find-lost-includesInclude files that we cannot find associated with this buffer.
semanticdb-find-scanned-include-tagsAll include tags scanned, plus action taken on the tag.
semanticdb-find-throttle-custom-listCustomization values for semanticdb find throttle.
semanticdb-implied-include-tagsInclude tags implied for all files of a given mode.

Defined functions (51)

semanticdb-brute-deep-find-tags-by-name(NAME &optional PATH FIND-FILE-MATCH)
semanticdb-brute-deep-find-tags-for-completion(PREFIX &optional PATH FIND-FILE-MATCH)
semanticdb-brute-find-tags-by-class(CLASS &optional PATH FIND-FILE-MATCH)
semanticdb-deep-find-tags-by-name(NAME &optional PATH FIND-FILE-MATCH)
semanticdb-deep-find-tags-by-name-regexp(REGEXP &optional PATH FIND-FILE-MATCH)
semanticdb-deep-find-tags-for-completion(PREFIX &optional PATH FIND-FILE-MATCH)
semanticdb-fast-strip-find-results(RESULTS)
semanticdb-find-adebug-insert-scanned-tag-cons(CONSDATA PREFIX PREBUTTONTEXT)
semanticdb-find-adebug-lost-includes()
semanticdb-find-adebug-scanned-includes()
semanticdb-find-incomplete-cache-entries-p(CACHE)
semanticdb-find-load-unloaded(FILENAME)
semanticdb-find-load-unloaded-default(FILENAME)
semanticdb-find-log-activity(TABLE RESULT)
semanticdb-find-log-move-to-end()
semanticdb-find-log-new-search(FORWHAT)
semanticdb-find-need-cache-update-p(TABLE)
semanticdb-find-result-length(RESULT)
semanticdb-find-result-mapc(FCN RESULT)
semanticdb-find-result-nth(RESULT N)
semanticdb-find-result-nth-in-buffer(RESULT N)
semanticdb-find-result-prin1-to-string(RESULT)
semanticdb-find-result-test(RESULT)
semanticdb-find-result-with-nil-p(RESULTP)
semanticdb-find-results-p(RESULTP)
semanticdb-find-search-index(&rest SLOTS)
semanticdb-find-search-index--anon-cmacro(WHOLE &rest SLOTS)
semanticdb-find-search-index--eieio-childp(OBJ)
semanticdb-find-search-index-child-p(OBJ)
semanticdb-find-search-index-list-p(ARG1)
semanticdb-find-search-index-p(OBJ)
semanticdb-find-table-for-include(INCLUDETAG &optional TABLE)
semanticdb-find-table-for-include-default(INCLUDETAG &optional TABLE)
semanticdb-find-tags-by-class(CLASS &optional PATH FIND-FILE-MATCH)
semanticdb-find-tags-by-name(NAME &optional PATH FIND-FILE-MATCH)
semanticdb-find-tags-by-name-regexp(REGEXP &optional PATH FIND-FILE-MATCH)
semanticdb-find-tags-collector(FUNCTION &optional PATH FIND-FILE-MATCH BRUTISH)
semanticdb-find-tags-external-children-of-type(TYPE &optional PATH FIND-FILE-MATCH)
semanticdb-find-tags-for-completion(PREFIX &optional PATH FIND-FILE-MATCH)
semanticdb-find-tags-subclasses-of-type(TYPE &optional PATH FIND-FILE-MATCH)
semanticdb-find-test-translate-path(&optional ARG)
semanticdb-find-test-translate-path-no-loading(&optional ARG)
semanticdb-find-throttle-active-p(ACCESS-TYPE)
semanticdb-find-toggle-logging()
semanticdb-find-translate-path(PATH BRUTISH)
semanticdb-find-translate-path-brutish-default(PATH)
semanticdb-find-translate-path-default(PATH BRUTISH)
semanticdb-find-translate-path-includes--internal(PATH)
semanticdb-find-translate-path-includes-default(PATH)
semanticdb-reset-log()
semanticdb-strip-find-results(RESULTS &optional FIND-FILE-MATCH)

Defined faces (0)