()
| 82 | const TableSplitKeyLen = 1 + idLen |
| 83 | |
| 84 | func init() { |
| 85 | // help kv package to refer the tablecodec package to resolve the kv.Key functions. |
| 86 | kv.DecodeTableIDFunc = func(key kv.Key) int64 { |
| 87 | //preCheck, avoid the noise error log. |
| 88 | if hasTablePrefix(key) && len(key) >= TableSplitKeyLen { |
| 89 | return DecodeTableID(key) |
| 90 | } |
| 91 | return 0 |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // TablePrefix returns table's prefix 't'. |
| 96 | func TablePrefix() []byte { |
nothing calls this directly
no test coverage detected