Skip to content

Commit

Permalink
adding meta to store v3 queries
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer committed Apr 26, 2024
1 parent 8b09c0f commit 66a7576
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions waku/waku_archive/driver/sqlite_driver/queries.nim
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,12 @@ proc selectMessagesByHistoryQueryWithLimit*(
let
pubsubTopic = queryRowPubsubTopicCallback(s, pubsubTopicCol = 3)
message = queryRowWakuMessageCallback(
s, contentTopicCol = 1, payloadCol = 2, versionCol = 4, senderTimestampCol = 5
s,
contentTopicCol = 1,
payloadCol = 2,
versionCol = 4,
senderTimestampCol = 5,
metaCol = 8,
)
digest = queryRowDigestCallback(s, digestCol = 6)
storedAt = queryRowReceiverTimestampCallback(s, storedAtCol = 0)
Expand Down Expand Up @@ -504,7 +509,7 @@ proc selectMessagesByHistoryQueryWithLimit*(
proc selectMessageByHashQuery(): SqlQueryStr =
var query: string

query = "SELECT contentTopic, payload, version, timestamp, messageHash"
query = "SELECT contentTopic, payload, version, timestamp, meta, messageHash"
query &= " FROM " & DbTable
query &= " WHERE messageHash = (?)"

Expand Down Expand Up @@ -674,7 +679,12 @@ proc selectMessagesByStoreQueryWithLimit*(

proc queryRowCallback(s: ptr sqlite3_stmt) =
wakuMessage = queryRowWakuMessageCallback(
s, contentTopicCol = 0, payloadCol = 1, versionCol = 2, senderTimestampCol = 3
s,
contentTopicCol = 0,
payloadCol = 1,
versionCol = 2,
senderTimestampCol = 3,
metaCol = 4,
)

let query = selectMessageByHashQuery()
Expand Down

0 comments on commit 66a7576

Please sign in to comment.