CavalliumDBEngine/src/main/java/it/cavallium/dbengine/client/DefaultDatabaseOptions.java

86 lines
2.7 KiB
Java
Raw Normal View History

2022-04-08 14:32:47 +02:00
package it.cavallium.dbengine.client;
import it.cavallium.data.generator.nativedata.NullableString;
2022-04-08 14:32:47 +02:00
import it.cavallium.data.generator.nativedata.Nullableboolean;
import it.cavallium.data.generator.nativedata.Nullableint;
import it.cavallium.data.generator.nativedata.Nullablelong;
import it.cavallium.dbengine.rpc.current.data.DatabaseOptions;
import it.cavallium.dbengine.rpc.current.data.DatabaseOptionsBuilder;
import it.cavallium.dbengine.rpc.current.data.DefaultColumnOptions;
import it.cavallium.dbengine.rpc.current.data.DefaultColumnOptionsBuilder;
import it.cavallium.dbengine.rpc.current.data.NamedColumnOptions;
import it.cavallium.dbengine.rpc.current.data.NamedColumnOptionsBuilder;
2022-06-01 17:36:21 +02:00
import it.cavallium.dbengine.rpc.current.data.nullables.NullableCompression;
2022-04-08 14:32:47 +02:00
import it.cavallium.dbengine.rpc.current.data.nullables.NullableFilter;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.rocksdb.RocksDB;
public class DefaultDatabaseOptions {
public static DefaultColumnOptions DEFAULT_DEFAULT_COLUMN_OPTIONS = new DefaultColumnOptions(
Collections.emptyList(),
Nullablelong.empty(),
Nullableboolean.empty(),
2022-04-11 20:04:27 +02:00
Nullableboolean.empty(),
NullableFilter.empty(),
Nullableint.empty(),
NullableString.empty(),
2022-06-01 17:36:21 +02:00
Nullablelong.empty(),
false,
Nullablelong.empty(),
Nullablelong.empty(),
NullableCompression.empty()
2022-04-08 14:32:47 +02:00
);
public static NamedColumnOptions DEFAULT_NAMED_COLUMN_OPTIONS = new NamedColumnOptions(
new String(RocksDB.DEFAULT_COLUMN_FAMILY, StandardCharsets.UTF_8),
Collections.emptyList(),
Nullablelong.empty(),
Nullableboolean.empty(),
2022-04-11 20:04:27 +02:00
Nullableboolean.empty(),
NullableFilter.empty(),
Nullableint.empty(),
NullableString.empty(),
2022-06-01 17:36:21 +02:00
Nullablelong.empty(),
false,
Nullablelong.empty(),
Nullablelong.empty(),
NullableCompression.empty()
2022-04-08 14:32:47 +02:00
);
public static DatabaseOptions DEFAULT_DATABASE_OPTIONS = new DatabaseOptions(List.of(),
Map.of(),
false,
false,
false,
false,
true,
true,
Nullableint.empty(),
Nullablelong.empty(),
2022-04-09 02:45:42 +02:00
Nullablelong.empty(),
Collections.emptyList(),
2022-04-11 16:53:17 +02:00
Nullablelong.empty(),
2022-04-08 14:32:47 +02:00
false,
DEFAULT_DEFAULT_COLUMN_OPTIONS,
List.of(),
NullableString.empty(),
NullableString.empty()
2022-04-08 14:32:47 +02:00
);
public static DatabaseOptionsBuilder builder() {
return DatabaseOptionsBuilder.builder(DEFAULT_DATABASE_OPTIONS);
}
public static DefaultColumnOptionsBuilder defaultColumnOptionsBuilder() {
return DefaultColumnOptionsBuilder.builder(DEFAULT_DEFAULT_COLUMN_OPTIONS);
}
public static NamedColumnOptionsBuilder namedColumnOptionsBuilder() {
return NamedColumnOptionsBuilder.builder(DEFAULT_NAMED_COLUMN_OPTIONS);
}
}