(state *replicationState, relationID uint32)
| 1106 | } |
| 1107 | |
| 1108 | func (r *LogicalReplicator) truncate(state *replicationState, relationID uint32) error { |
| 1109 | rel, ok := state.relations[relationID] |
| 1110 | if !ok { |
| 1111 | return fmt.Errorf("unknown relation ID %d", relationID) |
| 1112 | } |
| 1113 | |
| 1114 | r.logger.Debugf("Truncating table %s.%s\n", rel.Namespace, rel.RelationName) |
| 1115 | _, err := adapter.ExecInTxn(state.replicaCtx, `TRUNCATE `+catalog.ConnectIdentifiersANSI(rel.Namespace, rel.RelationName)) |
| 1116 | return err |
| 1117 | } |
| 1118 | |
| 1119 | func tupleDataFormat(dataType uint8) int16 { |
| 1120 | switch dataType { |
no test coverage detected