Skip to content

Commit 27aac0d

Browse files
committed
fix(mapper): update JSONB test assertions for ROW(..)
1 parent 4e532a5 commit 27aac0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/eql-mapper/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ mod test {
14861486
.map(|expr| match expr {
14871487
ast::Expr::Identifier(ident) => ident.to_string(),
14881488
ast::Expr::Value(ast::Value::SingleQuotedString(s)) => {
1489-
format!("'<encrypted-selector({})>'", s)
1489+
format!("ROW('<encrypted-selector({})>'::JSONB)", s)
14901490
}
14911491
_ => panic!("unsupported expr type in test util"),
14921492
})
@@ -1541,7 +1541,7 @@ mod test {
15411541
match typed.transform(test_helpers::dummy_encrypted_json_selector(&statement, ast::Value::SingleQuotedString("medications".to_owned()))) {
15421542
Ok(statement) => assert_eq!(
15431543
statement.to_string(),
1544-
format!("SELECT id, notes {} '<encrypted-selector(medications)>' AS meds FROM patients", op)
1544+
format!("SELECT id, notes {} ROW('<encrypted-selector(medications)>'::JSONB) AS meds FROM patients", op)
15451545
),
15461546
Err(err) => panic!("transformation failed: {err}"),
15471547
}

0 commit comments

Comments
 (0)