SchemaKey returns schema key for given attribute. Schema keys are stored separately with unique prefix, since we need to iterate over all schema keys. The structure of a schema key is as follows: byte 0: key type prefix (set to ByteSchema) byte 1-2: length of attr next len(attr) bytes: value of att
(attr string)
| 172 | // byte 1-2: length of attr |
| 173 | // next len(attr) bytes: value of attr |
| 174 | func SchemaKey(attr string) []byte { |
| 175 | key, _ := generateKey(ByteSchema, attr, 0) |
| 176 | return key |
| 177 | } |
| 178 | |
| 179 | // TypeKey returns type key for given type name. Type keys are stored separately |
| 180 | // with a unique prefix, since we need to iterate over all type keys. |