I have a list of ids like:
tracker_ids = [69, 70]
I need to get all the APInformation objects based on the tracker_id.
data looks like this:
{ 'tracker_id' : 69, 'cpu_core_avg': 89.890', 'is_threshold':
true,'datetime':1539053379040 }
{ 'tracker_id' : 70, 'cpu_core_avg': 65.0', 'is_threshold': false,
'datetime':1539053379040 }{ 'tracker_id' : 69, 'cpu_core_avg': 34.9',
'is_threshold': false,'datetime':1539053379040 }
I tried the following but it raises an error.
session.query(APInformation).filter(APInformation.data['tracker_id'].in_(tracker_ids),
APInformation.data['datetime'].astext.cast(BigInteger) >
1539053379040).all()
I dont know where i am missing the point?
Thank you
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAGGVXBNP4dxU8t75aGgSxbicS3FjKkthTDUiOmAehf6f3rPWjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.