Differences Between: [Versions 310 and 311] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]
Simple moodle database engine.
Copyright: | 2016 David Monllao {@link http://www.davidmonllao.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 395 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
engine:: (10 methods):
execute_query()
add_document()
delete_by_id()
delete()
is_server_ready()
is_installed()
get_query_total_count()
get_simple_query()
delete_index_for_context()
delete_index_for_course()
execute_query($filters, $usercontexts, $limit = 0) X-Ref |
Prepares a SQL query, applies filters and executes it returning its results. param: stdClass $filters Containing query and filters. param: array $usercontexts Contexts where the user has access. True if the user can access all contexts. param: int $limit The maximum number of results to return. return: \core_search\document[] Results or false if no results |
add_document($document, $fileindexing = false) X-Ref |
Adds a document to the search engine. This does not commit to the search engine. param: \core_search\document $document param: bool $fileindexing True if file indexing is to be used return: bool False if the file was skipped or failed, true on success |
delete_by_id($id) X-Ref |
Deletes the specified document. param: string $id The document id to delete return: void |
delete($areaid = null) X-Ref |
Delete all area's documents. param: string $areaid return: void |
is_server_ready() X-Ref |
Checks that the required table was installed. return: true|string Returns true if all good or an error string. |
is_installed() X-Ref |
It is always installed. return: true |
get_query_total_count() X-Ref |
Returns the total results. Including skipped results. return: int |
get_simple_query($q) X-Ref |
Returns the default query for db engines. param: string $q The query string return: array SQL string and params list |
delete_index_for_context(int $oldcontextid) X-Ref |
Simpledb supports deleting the index for a context. param: int $oldcontextid Context that has been deleted return: bool True to indicate that any data was actually deleted |
delete_index_for_course(int $oldcourseid) X-Ref |
Simpledb supports deleting the index for a course. param: int $oldcourseid return: bool True to indicate that any data was actually deleted |