Fix for event entry key type is now a string

This commit is contained in:
Ian Davis 2022-11-15 15:33:08 +00:00
parent e2ddc9745c
commit 73655eda3c
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ var ddls = []string{
event_id INTEGER, event_id INTEGER,
indexed INTEGER NOT NULL, indexed INTEGER NOT NULL,
flags BLOB NOT NULL, flags BLOB NOT NULL,
key BLOB NOT NULL, key TEXT NOT NULL,
value BLOB NOT NULL value BLOB NOT NULL
)`, )`,
@ -246,7 +246,7 @@ func (ei *EventIndex) PrefillFilter(ctx context.Context, f *EventFilter) error {
// JOIN ee1 event_entry ON event.id=ee1.event_id // JOIN ee1 event_entry ON event.id=ee1.event_id
joins = append(joins, fmt.Sprintf("event_entry %s on event.id=%[1]s.event_id", joinAlias)) joins = append(joins, fmt.Sprintf("event_entry %s on event.id=%[1]s.event_id", joinAlias))
clauses = append(clauses, fmt.Sprintf("%s.indexed=1 AND %[1]s.key=?", joinAlias)) clauses = append(clauses, fmt.Sprintf("%s.indexed=1 AND %[1]s.key=?", joinAlias))
values = append(values, []byte(key)) values = append(values, key)
subclauses := []string{} subclauses := []string{}
for _, val := range vals { for _, val := range vals {
subclauses = append(subclauses, fmt.Sprintf("%s.value=?", joinAlias)) subclauses = append(subclauses, fmt.Sprintf("%s.value=?", joinAlias))
@ -317,7 +317,7 @@ func (ei *EventIndex) PrefillFilter(ctx context.Context, f *EventFilter) error {
messageIndex int messageIndex int
reverted bool reverted bool
flags []byte flags []byte
key []byte key string
value []byte value []byte
} }

2
extern/filecoin-ffi vendored

@ -1 +1 @@
Subproject commit 39bed0d7a477eae618d310a476233eafe3e6b571 Subproject commit 2e788b5a50b600670a88f5397cbe856c2755fe4a