From d17b6581631183e461bbcbffb9fa632c96c941d4 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 13 Feb 2023 16:06:36 +0000 Subject: [PATCH] =?UTF-8?q?Support=20`us`=20in=20addition=20to=20`=C2=B5s`?= =?UTF-8?q?=20for=20microsecond=20durations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/sql/duration.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/sql/duration.rs b/lib/src/sql/duration.rs index c9076b2c..5f77277a 100644 --- a/lib/src/sql/duration.rs +++ b/lib/src/sql/duration.rs @@ -243,6 +243,7 @@ fn duration_raw(i: &str) -> IResult<&str, Duration> { Duration(match u { "ns" => time::Duration::from_nanos(v), "µs" => time::Duration::from_micros(v), + "us" => time::Duration::from_micros(v), "ms" => time::Duration::from_millis(v), "s" => time::Duration::from_secs(v), "m" => time::Duration::from_secs(v * SECONDS_PER_MINUTE), @@ -263,6 +264,7 @@ fn unit(i: &str) -> IResult<&str, &str> { alt(( tag("ns"), tag("µs"), + tag("us"), tag("ms"), tag("s"), tag("m"),