Helper function to get the primary key indices.
(appender *DeltaAppender)
| 614 | |
| 615 | // Helper function to get the primary key indices. |
| 616 | func getPrimaryKeyIndices(appender *DeltaAppender) []int { |
| 617 | schema := appender.BaseSchema() |
| 618 | indices := make([]int, 0, 1) |
| 619 | for i, col := range schema { |
| 620 | if col.PrimaryKey { |
| 621 | indices = append(indices, i+appender.NumAugmentedFields()) |
| 622 | } |
| 623 | } |
| 624 | return indices |
| 625 | } |
| 626 | |
| 627 | // Helper function to get the primary key. For composite primary keys, `row()` is used. |
| 628 | func getPrimaryKeyStruct(schema sql.Schema) string { |
no test coverage detected