Local tests for SetCdr, SetRatedCdr and GetStoredCdrs

This commit is contained in:
DanB
2014-03-16 18:49:05 +01:00
parent ee31976401
commit c66f4f2710
3 changed files with 184 additions and 9 deletions

View File

@@ -632,19 +632,19 @@ func (self *SQLStorage) GetStoredCdrs(runId, cdrHost, cdrSource, reqType, direct
if len(fltr) != 0 {
fltr += " AND "
}
fltr += fmt.Sprintf(" destination LIKE '%s%'", destPrefix)
fltr += fmt.Sprintf(" destination LIKE '%s%%'", destPrefix)
}
if !timeStart.IsZero() {
if len(fltr) != 0 {
fltr += " AND "
}
fltr += fmt.Sprintf(" answer_time>='%d'", timeStart)
fltr += fmt.Sprintf(" answer_time>='%s'", timeStart)
}
if !timeEnd.IsZero() {
if len(fltr) != 0 {
fltr += " AND "
}
fltr += fmt.Sprintf(" answer_time<'%d'", timeEnd)
fltr += fmt.Sprintf(" answer_time<'%s'", timeEnd)
}
if ignoreRated {
if len(fltr) != 0 {