From 48478774238848dd86ad37bb1a43003bdd583eef Mon Sep 17 00:00:00 2001 From: inv-jishnu <31100916+inv-jishnu@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:45:06 +0530 Subject: [PATCH] Add data import enums (#2398) Co-authored-by: Peckstadt Yves --- .../db/dataloader/core/dataimport/ImportMode.java | 8 ++++++++ .../controlfile/ControlFileValidationLevel.java | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/ImportMode.java create mode 100644 data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/controlfile/ControlFileValidationLevel.java diff --git a/data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/ImportMode.java b/data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/ImportMode.java new file mode 100644 index 0000000000..7f2a805e75 --- /dev/null +++ b/data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/ImportMode.java @@ -0,0 +1,8 @@ +package com.scalar.db.dataloader.core.dataimport; + +/** Represents the way to be imported data is handled */ +public enum ImportMode { + INSERT, + UPDATE, + UPSERT +} diff --git a/data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/controlfile/ControlFileValidationLevel.java b/data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/controlfile/ControlFileValidationLevel.java new file mode 100644 index 0000000000..3753d0ba65 --- /dev/null +++ b/data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/controlfile/ControlFileValidationLevel.java @@ -0,0 +1,11 @@ +package com.scalar.db.dataloader.core.dataimport.controlfile; + +/** Control file validation level */ +public enum ControlFileValidationLevel { + /* All columns need to be mapped */ + FULL, + /* All partition key and clustering key columns need to be mapped */ + KEYS, + /* Only validate the columns that are mapped */ + MAPPED +}