MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / column_names_from_query_result

Function column_names_from_query_result

src/executor/query.rs:1638–1652  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1636
1637 #[test]
1638 fn column_names_from_query_result() {
1639 let mut values = BTreeMap::new();
1640 values.insert("id".to_string(), Value::Int(Some(1)));
1641 values.insert(
1642 "name".to_string(),
1643 Value::String(Some(Box::new("Abc".to_owned()))),
1644 );
1645 let query_result = QueryResult {
1646 row: QueryResultRow::Mock(crate::MockRow { values }),
1647 };
1648 assert_eq!(
1649 query_result.column_names(),
1650 vec!["id".to_owned(), "name".to_owned()]
1651 );
1652 }
1653}

Callers

nothing calls this directly

Calls 2

newFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected