Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fix to return id and type in place of entityId and entityType (#751)
- Fixed failing test cases of test_geocoding.py (#755)
- Mentioned service path isn't the same as Orion's (#758)
- Fixed to handle DEFAULT_LIMIT for queries (#763)

### Important: Backward compatibility

Expand Down
1 change: 0 additions & 1 deletion specification/quantumleap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ parameters:
name: limit
type: integer
minimum: 1
default: 10000
description: "Optional. Maximum number of results to retrieve in a single
response."
offset:
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/query_1T1E1A.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def query_1T1E1A(attr_name, # In Path
from_date=None,
to_date=None,
last_n=None,
limit=10000,
limit=None,
offset=0,
georel=None,
geometry=None,
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/query_1T1ENA.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def query_1T1ENA(entity_id, # In Path
from_date=None,
to_date=None,
last_n=None,
limit=10000,
limit=None,
offset=0,
georel=None,
geometry=None,
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/query_1TNE1A.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def query_1TNE1A(attr_name, # In Path
from_date=None,
to_date=None,
last_n=None,
limit=10000,
limit=None,
offset=0,
georel=None,
geometry=None,
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/query_NTNE.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings


def query_NTNE(limit=10000,
def query_NTNE(limit=None,
type_=None, # In Query
from_date=None,
to_date=None,
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/query_NTNE1A.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def query_NTNE1A(attr_name, # In Path
from_date=None,
to_date=None,
last_n=None,
limit=10000,
limit=None,
offset=0,
georel=None,
geometry=None,
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/query_NTNENA.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def query_NTNENA(id_=None, # In Query
from_date=None,
to_date=None,
last_n=None,
limit=10000,
limit=None,
offset=0,
georel=None,
geometry=None,
Expand Down
13 changes: 5 additions & 8 deletions src/translators/sql_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def _get_limit(self, limit, last_n):
# https://crate.io/docs/crate/reference/en/latest/general/dql/selects.html#limits
default_limit = self.config.default_limit()

if limit is None or limit > default_limit:
if limit is None:
limit = default_limit

if last_n is None:
Expand Down Expand Up @@ -921,7 +921,7 @@ def query(self,
from_date=None,
to_date=None,
last_n=None,
limit=10000,
limit=None,
offset=0,
idPattern=None,
fiware_service=None,
Expand Down Expand Up @@ -1154,7 +1154,7 @@ def query_ids(self,
entity_type=None,
from_date=None,
to_date=None,
limit=10000,
limit=None,
offset=0,
idPattern=None,
fiware_service=None,
Expand All @@ -1178,7 +1178,6 @@ def query_ids(self,
for tn in table_names:
if "." in tn:
table_names.remove(tn)
limit = min(10000, limit)
offset = max(0, offset)
len_tn = 0
result = []
Expand Down Expand Up @@ -1223,7 +1222,7 @@ def query_last_value(self,
attr_names=None,
from_date=None,
to_date=None,
limit=10000,
limit=None,
offset=0,
idPattern=None,
fiware_service=None,
Expand All @@ -1244,7 +1243,6 @@ def query_last_value(self,
for tn in table_names:
if "." in tn:
table_names.remove(tn)
limit = min(10000, limit)
offset = max(0, offset)
len_tn = 0
result = []
Expand Down Expand Up @@ -1316,7 +1314,7 @@ def query_instanceId(self,
entity_type=None,
from_date=None,
to_date=None,
limit=10000,
limit=None,
offset=0,
idPattern=None,
fiware_service=None,
Expand Down Expand Up @@ -1347,7 +1345,6 @@ def query_instanceId(self,
idPattern,
fiware_servicepath)

limit = min(10000, limit)
offset = max(0, offset)
result = []
if len(table_names) > 0:
Expand Down