diff --git a/stix2/datastore/relational_db/database_backends/sqlite_backend.py b/stix2/datastore/relational_db/database_backends/sqlite_backend.py index b6cea195..a839b853 100644 --- a/stix2/datastore/relational_db/database_backends/sqlite_backend.py +++ b/stix2/datastore/relational_db/database_backends/sqlite_backend.py @@ -57,14 +57,11 @@ def determine_sql_type_for_timestamp_property(): # noqa: F811 def array_allowed(): return False - def create_regex_constraint_expression(self, column_name, pattern): - return None - - def create_regex_constraint_and_expression(self, clause1, clause2): - return None + def create_regex_constraint_clause(self, column_name, pattern): + return f"{column_name} REGEXP {pattern}" @staticmethod def next_id(data_sink): - # hack, which is nit reliable + # hack, which is not reliable, must look for a better solution SQLiteBackend.temp_sequence_count += 1 return SQLiteBackend.temp_sequence_count