Skip to content

Commit 940f4f6

Browse files
author
Zoran Cvetkov
committed
better comment
1 parent 4136889 commit 940f4f6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

store/postgres/src/relational_queries.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,8 +2064,10 @@ impl<'a> QueryFragment<Pg> for FindRangeQuery<'a> {
20642064
}
20652065

20662066
// Generate
2067-
// select '..' as entity, to_jsonb(e.*) as data, block$ as block_number
2068-
// from schema.table e where id = $1
2067+
// select '..' as entity, to_jsonb(e.*) as data, {BLOCK_STATEMENT} as block_number
2068+
// from schema.table e where ...
2069+
// Here the {BLOCK_STATEMENT} is 'block$' for immutable tables and either 'lower(block_range)'
2070+
// or 'upper(block_range)' depending on the bound_side variable.
20692071
out.push_sql("select ");
20702072
out.push_bind_param::<Text, _>(table.object.as_str())?;
20712073
out.push_sql(" as entity, to_jsonb(e.*) as data,");

0 commit comments

Comments
 (0)