-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using Bytes
for ID
and switch block explorer to that
#1414
Comments
lutter
added a commit
that referenced
this issue
Jan 12, 2020
lutter
added a commit
that referenced
this issue
Jan 12, 2020
lutter
added a commit
that referenced
this issue
Jan 13, 2020
lutter
added a commit
that referenced
this issue
Jan 14, 2020
lutter
added a commit
that referenced
this issue
Apr 14, 2020
lutter
added a commit
that referenced
this issue
Apr 16, 2020
lutter
added a commit
that referenced
this issue
Apr 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the
ID
type for entities is always mapped to aString
/text
column in the database. For id's that are really hex strings/bytes that's wasteful as the string representation takes about 2x as much storage as a representation asBytes
/bytea
.The relational storage code has some provisions for using either
String
orBytes
, but they are not fully finished and tested. For the block explorer, we should switch id's toBytes
. To keep the changes in the rest of the code to a minimum, we will do this solely within the storage code. The rest of the code (when dealing withEntity
) will still get aString
id, though that is expected to be formatted as a hex string0xdeadbeef...
The following needs to happen for that:
IdType
an argument forStore::create_subgraph_deployment
; the block explorer will passIdType::Bytes
there, while all other subgraphs will passIdType::String
information_schema.columns
to decide whether the subgraph usesString
orBytes
for idsrelational_queries.rs
that currently assume that ids are strings and write tests for that (mostly requires switchingout.push_bind_param::<Text, _>(self.entity_id)
to something better)The text was updated successfully, but these errors were encountered: