Expand description
Module for database features (based on SQLite)
Structs§
- Database
- Manage the database according to the database model defined with
MitreDatabase. - Mitre
Data - The
MitreDatastruct represents the necessary information to Mitre Data to used to.
Constants§
- MITRE_
DB_ NAME - Mitre database name
Traits§
- Mitre
Database - Define the tables definition for the Mitre data
- Mitre
Definition - Defines a MitreData definition.
Functions§
- bind_
criteria - Associate the list of arguments with the SQL query in construction
- criteria_
analysis - Analyse a string criteria and split each element by separating the words criteria from the operators.
- db_
mitre_ path - Return the path of mitre database
- execute_
query - Executes a given query and processes the response.
- find_
capec_ by_ id - find the capec by its id.
- find_
columns - Finds the list of columns for the given table name
- find_
cwe_ by_ id - find the cwe by its id.
- find_
domain_ and_ criteria - Split the arguments list to
domainandcriteria.domainis corresponding to the name of field into the concerning table’s database. - find_
mitre_ by_ id - Find the mitre record according to the mitre’s identification.
- parse_
id_ to_ u32 - Parse the string values to a list of unsigned 32 bits.
The string must be formatted like this:
::<num>::<num>::...:: - prepare_
query - Prepare the query model given as parameter with the elements of criteria
- refresh_
data_ mitre_ into_ database - Refresh the Mitre data that will be injected into the local database.
- refresh_
mitre_ database - Refresh the mitre database. the function takes a string that contains a list of csv files and the associated url. The method converts this string in an internal vector and create the query to download the CSV file from the associated url and inject these values into the local mitre database.
- search
- Search the list of words into the database.
- searching
- Search the values into the list of columns.
- text_
or_ null - Return the
Value::Nullif the string argument is empty. Otherwise return the correspondingValue/
Type Aliases§
- Search
Result Extractor - Record extractor from the search result