Class MergeStatementValidator
- java.lang.Object
-
- com.snowflake.connectors.util.sql.MergeStatementValidator
-
public class MergeStatementValidator extends Object
Validator for merge statements executed in Snowflake.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXPRESSION_LIMIT
Maximum limit of inserted/updated records.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,K>
voidvalidateDuplicates(Collection<T> collection, Function<T,K> idExtractor)
Validates if collection contains only unique keys.static <T> void
validateRecordLimit(Collection<T> collection)
Validates if collection size is exceeding statement limit of 16384.
-
-
-
Field Detail
-
EXPRESSION_LIMIT
public static final int EXPRESSION_LIMIT
Maximum limit of inserted/updated records.- See Also:
- Constant Field Values
-
-
Method Detail
-
validateRecordLimit
public static <T> void validateRecordLimit(Collection<T> collection)
Validates if collection size is exceeding statement limit of 16384.- Type Parameters:
T
- Type of the collection- Parameters:
collection
- Validated collection
-
validateDuplicates
public static <T,K> void validateDuplicates(Collection<T> collection, Function<T,K> idExtractor)
Validates if collection contains only unique keys.- Type Parameters:
T
- type of itemK
- type of item identifier- Parameters:
collection
- validated collectionidExtractor
- function for extraction of each item identifier
-
-