MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / expect_psql_table

Function expect_psql_table

crates/cli/src/subcommands/sql.rs:506–513  ·  view source on GitHub ↗
(client: PsqlClient, ty: &ProductType, rows: Vec<ProductValue>, expected: &str)

Source from the content-addressed store, hash-verified

504 }
505
506 fn expect_psql_table(client: PsqlClient, ty: &ProductType, rows: Vec<ProductValue>, expected: &str) {
507 let table = build_table(client, ty, rows.into_iter().map(Ok::<_, ()>))
508 .unwrap()
509 .to_string();
510 let mut table = table.split('\n').map(|x| x.trim_end()).join("\n");
511 table.insert(0, '\n');
512 assert_eq!(expected, table);
513 }
514
515 // Verify the output of `sql` matches the inputs that return true for [`AlgebraicType::is_special()`]
516 #[test]

Callers 1

output_special_typesFunction · 0.85

Calls 8

build_tableFunction · 0.85
joinMethod · 0.80
splitMethod · 0.80
insertMethod · 0.65
to_stringMethod · 0.45
unwrapMethod · 0.45
mapMethod · 0.45
into_iterMethod · 0.45

Tested by 1

output_special_typesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…