Skip to content

Commit 3cda3ca

Browse files
committed
Avoid intermediate dependency node id strings
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
1 parent 05c11c1 commit 3cda3ca

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

query-compiler/core/src/query_graph/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ impl NodeRef {
131131
pub fn id(&self) -> String {
132132
self.node_ix.index().to_string()
133133
}
134+
135+
/// Returns the raw index of the Node.
136+
pub fn index(&self) -> usize {
137+
self.node_ix.index()
138+
}
134139
}
135140

136141
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]

query-compiler/query-compiler/src/binding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn node_result(node: NodeRef) -> Cow<'static, str> {
1616
}
1717

1818
pub fn projected_dependency(source: NodeRef, field: &SelectedField) -> Cow<'static, str> {
19-
format!("{}{FIELD_SEPARATOR}{}", source.id(), field.prisma_name()).into()
19+
format!("{}{FIELD_SEPARATOR}{}", source.index(), field.prisma_name()).into()
2020
}
2121

2222
pub fn join_parent() -> Cow<'static, str> {

0 commit comments

Comments
 (0)