aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/datafile/loadmode.h
diff options
context:
space:
mode:
authorvvvv <vvvv@ydb.tech>2023-07-31 18:21:04 +0300
committervvvv <vvvv@ydb.tech>2023-07-31 18:21:04 +0300
commitdec41c40e51aa407edef81a3c566a5a15780fc49 (patch)
tree4f197b596b32f35eca368121f0dff913419da9af /library/cpp/deprecated/datafile/loadmode.h
parent3ca8b54c96e09eb2b65be7f09675623438d559c7 (diff)
downloadydb-dec41c40e51aa407edef81a3c566a5a15780fc49.tar.gz
YQL-16239 Move purecalc to public
Diffstat (limited to 'library/cpp/deprecated/datafile/loadmode.h')
-rw-r--r--library/cpp/deprecated/datafile/loadmode.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/library/cpp/deprecated/datafile/loadmode.h b/library/cpp/deprecated/datafile/loadmode.h
new file mode 100644
index 00000000000..f04054dd645
--- /dev/null
+++ b/library/cpp/deprecated/datafile/loadmode.h
@@ -0,0 +1,20 @@
+#pragma once
+
+// It is recommended to support all reasonal value combinations via this enum,
+// to let Load() function argument be of EDataLoadMode type, not just int type
+
+enum EDataLoadMode {
+ DLM_READ = 0,
+ DLM_MMAP_PRC = 1, // precharge
+ DLM_MMAP = 2, // w/o precharge
+ DLM_MMAP_AUTO_PRC = 3, // precharge automatically (same as DLM_MMAP unless specifically supported)
+ DLM_LD_TYPE_MASK = 15,
+ DLM_EXACT_SIZE = 16, // fail if input file is larger than what header says
+
+ DLM_READ_ESZ = DLM_READ | DLM_EXACT_SIZE,
+ DLM_MMAP_PRC_ESZ = DLM_MMAP_PRC | DLM_EXACT_SIZE,
+ DLM_MMAP_ESZ = DLM_MMAP | DLM_EXACT_SIZE,
+ DLM_MMAP_APRC_ESZ = DLM_MMAP_AUTO_PRC | DLM_EXACT_SIZE,
+
+ DLM_DEFAULT = DLM_MMAP_PRC_ESZ,
+};