![JAR search and dependency download from the Maven repository](/logo.png)
com.ning.billing.meter.timeline.aggregator.TimelineAggregatorSqlDao.sql.stg Maven / Gradle / Ivy
group TimelineAggregatorDAO;
CHECK_TENANT() ::= "tenant_record_id = :tenantRecordId"
AND_CHECK_TENANT() ::= "AND "
getStreamingAggregationCandidates() ::= <<
select
record_id
, source_record_id
, metric_record_id
, start_time
, end_time
, in_row_samples
, blob_samples
, sample_count
, aggregation_level
, not_valid
, dont_aggregate
from timeline_chunks
where source_record_id != 0 and aggregation_level = :aggregationLevel and not_valid = 0
order by source_record_id, metric_record_id, start_time
>>
getAggregationCandidatesForSourceIdAndMetricIds(metricIds) ::= <<
select
record_id
, source_record_id
, metric_record_id
, start_time
, end_time
, in_row_samples
, blob_samples
, sample_count
, aggregation_level
, not_valid
, dont_aggregate
from timeline_chunks
where source_record_id = :source_id
and metric_record_id in ()
;
>>
makeTimelineChunkValid() ::= <<
update timeline_chunks
set not_valid = 0
where record_id = :chunkId
;
>>
makeTimelineChunksInvalid(chunkIds) ::=<<
update timeline_chunks
set not_valid = 1
where record_id in ()
;
>>
deleteTimelineChunks(chunkIds) ::=<<
delete from timeline_chunks where record_id in () ;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy