fix: delete max ok
This commit is contained in:
parent
684bc22130
commit
6cd689ea53
|
@ -177,10 +177,10 @@ class TDTestCase(TBase):
|
|||
sql = f"select ts from d0 where ui={expectMax}"
|
||||
tdSql.query(sql)
|
||||
tss = tdSql.getColData(0)
|
||||
strts = ",".join(map(str,tss))
|
||||
# delete
|
||||
sql = f"delete from d0 where ts in ({strts})"
|
||||
tdSql.execute(sql)
|
||||
for ts in tss:
|
||||
# delete
|
||||
sql = f"delete from d0 where ts = '{ts}'"
|
||||
tdSql.execute(sql)
|
||||
expectMax -= 1
|
||||
|
||||
self.checkInsertCorrect()
|
||||
|
|
|
@ -292,3 +292,15 @@ class TBase:
|
|||
if len(lists) == 0:
|
||||
tdLog.exit(f"list is empty {tips}")
|
||||
|
||||
|
||||
#
|
||||
# str util
|
||||
#
|
||||
# covert list to sql format string
|
||||
def listSql(self, lists, sepa = ","):
|
||||
strs = ""
|
||||
for ls in lists:
|
||||
if strs != "":
|
||||
strs += sepa
|
||||
strs += f"'{ls}'"
|
||||
return strs
|
Loading…
Reference in New Issue