Fix USING TIMEOUT time generation (#299)

Scylla does not support fractions.
We need to make sure that time is formatted the following way: XmYsZms
This commit is contained in:
Dmitry Kropachev
2025-01-27 11:22:34 -04:00
committed by GitHub
parent ab73391f35
commit 2f79f86b7c
4 changed files with 93 additions and 1 deletions

View File

@@ -94,7 +94,7 @@ func (u *using) writeCql(cql *bytes.Buffer) (names []string) {
if u.timeout != 0 {
writePreamble(cql)
fmt.Fprintf(cql, "TIMEOUT %s ", u.timeout)
fmt.Fprintf(cql, "TIMEOUT %s ", formatDuration(u.timeout))
} else if u.timeoutName != "" {
writePreamble(cql)
cql.WriteString("TIMEOUT ? ")