nsmcp::AccessRecordStoreSQLite method rollBatch (protected)

 <instance of nsmcp::AccessRecordStoreSQLite[i]> rollBatch \
    [ batchSource ]

Defined in /usr/local/ns/tcl/nsmcp/log-traffic-record-store.tcl

Parameters:
batchSource (optional, defaults to "temp.nsmcp_ingest_batch")

Testcases:
No testcase defined.
Source code:
${:db} execute "
    INSERT INTO main.minutes SELECT fid, CAST(t/60 AS INTEGER)*60, status, pool, method, source,
    count(*), sum(bytes) FROM $batchSource WHERE kind=0 GROUP BY fid, CAST(t/60 AS INTEGER), status, pool,
    method, source
    ON CONFLICT(fid,slot,status,pool,method,source) DO UPDATE SET n=n+excluded.n,bytes=bytes+excluded.bytes
"
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: