fix(postgresql): loosen requirements for getPrimaryKeyWhereClause - #103
vinhloc30796 wants to merge 2 commits into
Conversation
| whereClause, err := d.getPrimaryKeyWhereClauseTyped(table, primaryKey, "") | ||
| if err != nil { | ||
| whereClause = getPrimaryKeyWhereClause(primaryKey, "") | ||
| } |
There was a problem hiding this comment.
Why is this a good way of doing it, can you add a comment explaining the reasoning here, we should also log the error minimally in DEBUG mode if it's expected to log a lot of time.
| if err != nil { | ||
| onClause = getPrimaryKeyWhereClause(primaryKey, table.nameEscaped) | ||
| } |
There was a problem hiding this comment.
Same here, add comment as the why it's correct and log error.
| primaryKeySelector, err := d.getPrimaryKeyWhereClauseTyped(o.table, o.primaryKey, "") | ||
| if err != nil { | ||
| return "", err | ||
| } |
There was a problem hiding this comment.
Is this backward compatible? The question is essentially, if there is already substreams_history entries`, are they going to be read correctly?
|
Hi @vinhloc30796 — thanks for this, and sorry for the long silence. This repository is being deprecated (see #133). The SQL sink now lives in the main The code moved as-is, so the port is mostly a path rewrite: The typed primary-key / array-literal handling isn't in the CLI yet, and the underlying problem is still real — if you're up for reopening it against Closing this one out. |
substreams_historywill look like so: