A semantic search engine for source code https://bitshift.benkurtovic.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
817 B

  1. """
  2. Module with classes and functions to handle communication with the MySQL
  3. database backend, which manages the search index.
  4. """
  5. import oursql
  6. class Database(object):
  7. """Represents the MySQL database."""
  8. def __init__(self):
  9. pass
  10. def _connect(self):
  11. pass
  12. def _create(self):
  13. pass
  14. def search(self, query):
  15. """
  16. Search the database.
  17. :param query: The query to search for.
  18. :type query: :py:class:`~.query.tree.Tree`
  19. :return: A list of search results.
  20. :rtype: list of :py:class:`.Codelet`\ s
  21. """
  22. pass
  23. def insert(self, codelet):
  24. """
  25. Insert a codelet into the database.
  26. :param codelet: The codelet to insert.
  27. :type codelet: :py:class:`.Codelet`
  28. """
  29. pass