Found during synchestra pkg/state/replication review (synchestra-io/synchestra PR #15).
getRecordsReader/recordsReader.Next construct every record via dalrecord.NewRecordWithData(dalrecord.NewKeyWithID("Unknown", ""), ...) and only place the row's id into Data() — record.Key().ID is always the empty string. dalgo2ingitdb's equivalent query path builds a real dal.NewKeyWithID(collection, recKey) per row, so consumers that need the record key behave differently across the two adapters.
Downstream effect: synchestra's loadOutboxEvents must check both rec.Key().ID and Data()["id"] as a workaround (commented as such, to be removed when this is fixed). Any other consumer doing ExecuteQueryToRecordsReader + Key().ID silently gets "".
Expected: the SQL query reader populates Key().ID (and collection) like dalgo2ingitdb does.
🤖 Generated with Claude Code
Found during synchestra pkg/state/replication review (synchestra-io/synchestra PR #15).
getRecordsReader/recordsReader.Nextconstruct every record viadalrecord.NewRecordWithData(dalrecord.NewKeyWithID("Unknown", ""), ...)and only place the row's id intoData()—record.Key().IDis always the empty string.dalgo2ingitdb's equivalent query path builds a realdal.NewKeyWithID(collection, recKey)per row, so consumers that need the record key behave differently across the two adapters.Downstream effect: synchestra's
loadOutboxEventsmust check bothrec.Key().IDandData()["id"]as a workaround (commented as such, to be removed when this is fixed). Any other consumer doingExecuteQueryToRecordsReader+Key().IDsilently gets "".Expected: the SQL query reader populates
Key().ID(and collection) like dalgo2ingitdb does.🤖 Generated with Claude Code