Skip to content

Commit 8ae8c46

Browse files
author
Zoran Cvetkov
committed
remove vid from db reads
1 parent a50fcbc commit 8ae8c46

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

store/postgres/src/relational/dsl.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,8 @@ impl<'a> Table<'a> {
285285
}
286286
}
287287

288-
cols.push(&*VID_COL);
289-
290288
if T::WITH_SYSTEM_COLUMNS {
289+
cols.push(&*VID_COL);
291290
if self.meta.immutable {
292291
cols.push(&*BLOCK_COL);
293292
} else {

store/postgres/src/relational_queries.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use crate::block_range::{BoundSide, EntityBlockRange};
3939
use crate::relational::dsl::AtBlock;
4040
use crate::relational::{
4141
dsl, Column, ColumnType, Layout, SqlName, Table, BYTE_ARRAY_PREFIX_SIZE, PRIMARY_KEY_COLUMN,
42-
STRING_PREFIX_SIZE, VID_COLUMN,
42+
STRING_PREFIX_SIZE,
4343
};
4444
use crate::{
4545
block_range::{
@@ -514,14 +514,15 @@ impl EntityData {
514514
// table column; those will be things like the
515515
// block_range that `select *` pulls in but that we
516516
// don't care about here
517-
if key == VID_COLUMN {
518-
// VID is not in the input schema but we need it, so deserialize it too
519-
match T::Value::from_column_value(&ColumnType::Int8, json) {
520-
Ok(value) if value.is_null() => None,
521-
Ok(value) => Some(Ok((Word::from(VID_COLUMN), value))),
522-
Err(e) => Some(Err(e)),
523-
}
524-
} else if let Some(column) = table.column(&SqlName::verbatim(key)) {
517+
// if key == VID_COLUMN {
518+
// // VID is not in the input schema but we need it, so deserialize it too
519+
// match T::Value::from_column_value(&ColumnType::Int8, json) {
520+
// Ok(value) if value.is_null() => None,
521+
// Ok(value) => Some(Ok((Word::from(VID_COLUMN), value))),
522+
// Err(e) => Some(Err(e)),
523+
// }
524+
// } else
525+
if let Some(column) = table.column(&SqlName::verbatim(key)) {
525526
match T::Value::from_column_value(&column.column_type, json) {
526527
Ok(value) if value.is_null() => None,
527528
Ok(value) => Some(Ok((Word::from(column.field.to_string()), value))),

0 commit comments

Comments
 (0)