MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_left_right

Function test_left_right

src/functions/string_functions.rs:370–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

368
369 #[test]
370 fn test_left_right() {
371 let conn = Connection::open_in_memory().unwrap();
372 register_string_functions(&conn).unwrap();
373
374 let result: String = conn.query_row(
375 "SELECT left('hello', 3)",
376 [],
377 |row| row.get(0)
378 ).unwrap();
379 assert_eq!(result, "hel");
380
381 let result: String = conn.query_row(
382 "SELECT right('hello', 3)",
383 [],
384 |row| row.get(0)
385 ).unwrap();
386 assert_eq!(result, "llo");
387 }
388
389 #[test]
390 fn test_lpad_rpad() {

Callers

nothing calls this directly

Calls 2

getMethod · 0.45

Tested by

no test coverage detected