Skip to content

Commit 8aef96c

Browse files
author
Ali Razmjoo
authored
Merge pull request #339 from spiderxm/development-refactor
removing functions not being used anymore due to migration to elasticsearch
2 parents 21ba3eb + a3b4b1e commit 8aef96c

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

api/database_queries.py

+1-36
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
88
Created this file because the queries are repeated over the URI's.
99
"""
10-
from api.utility import (fix_date,
11-
fix_limit,
12-
fix_skip)
10+
from api.utility import fix_date
1311

1412
sort_by_count = {
1513
"$sort": (
@@ -88,24 +86,6 @@ def filter_by_fields(query, fields):
8886
}
8987

9088

91-
def filter_by_skip(skip):
92-
return {
93-
"$skip": fix_skip(skip)
94-
}
95-
96-
97-
def filter_by_limit(limit):
98-
return {
99-
"$limit": fix_limit(limit)
100-
}
101-
102-
103-
def filter_by_country_ip_dest(country):
104-
return {
105-
"country_ip_dest": country
106-
}
107-
108-
10989
def filter_by_module_name(module_name):
11090
return {
11191
"match": {
@@ -114,21 +94,6 @@ def filter_by_module_name(module_name):
11494
}
11595

11696

117-
# todo: not used?
118-
def filter_by_exclude_unknown_country():
119-
return {
120-
"country_ip_dest": {
121-
"$gt": "-"
122-
}
123-
}
124-
125-
126-
def filter_by_match(match_query):
127-
return {
128-
"$match": match_query
129-
}
130-
131-
13297
def filter_by_regex(field, regex):
13398
return {
13499
"regexp": {

0 commit comments

Comments
 (0)