()
| 531 | |
| 532 | #[test] |
| 533 | fn as_of_system_time_now() { |
| 534 | let before = std::time::SystemTime::now() |
| 535 | .duration_since(std::time::UNIX_EPOCH) |
| 536 | .unwrap() |
| 537 | .as_millis() as i64; |
| 538 | let ex = extract("SELECT * FROM array_slice('g', '{}') AS OF SYSTEM TIME NOW()") |
| 539 | .unwrap() |
| 540 | .unwrap(); |
| 541 | let after = std::time::SystemTime::now() |
| 542 | .duration_since(std::time::UNIX_EPOCH) |
| 543 | .unwrap() |
| 544 | .as_millis() as i64; |
| 545 | let ts = ex.temporal.system_as_of_ms.unwrap(); |
| 546 | assert!( |
| 547 | ts >= before && ts <= after, |
| 548 | "NOW() ts {ts} not in [{before}, {after}]" |
| 549 | ); |
| 550 | } |
| 551 | |
| 552 | #[test] |
| 553 | fn as_of_system_time_unsupported_expr_rejected() { |
nothing calls this directly
no test coverage detected