CavalliumDBEngine/src/main/java/it/cavallium/dbengine/database/Column.java

25 lines
548 B
Java
Raw Normal View History

2020-12-07 22:15:18 +01:00
package it.cavallium.dbengine.database;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
import java.util.StringJoiner;
2021-06-19 16:26:54 +02:00
public record Column(String name) {
2020-12-07 22:15:18 +01:00
2021-01-31 15:47:48 +01:00
public static Column dictionary(String name) {
2020-12-07 22:15:18 +01:00
return new Column("hash_map_" + name);
}
2021-01-31 15:47:48 +01:00
public static Column deprecatedSet(String name) {
2020-12-07 22:15:18 +01:00
return new Column("hash_set_" + name);
}
public static Column special(String name) {
return new Column(name);
}
public static String toString(byte[] name) {
return new String(name, StandardCharsets.US_ASCII);
}
}