Class DataSourceOptions


  • public class DataSourceOptions
    extends java.lang.Object
    Options shared by data sources of all types.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.util.Set<java.util.Set<java.lang.String>>> getUniqueKeySets​(java.util.Properties options)
      Returns the parsed value of the UNIQUE_KEY_SETS option.
      static java.util.Map<java.lang.String,​java.util.Set<java.util.Set<java.lang.String>>> getUniqueKeySets​(java.util.Properties options, java.util.function.Function<java.lang.String,​Pair<java.lang.String,​java.lang.String>> splitTableColumn)
      Parses the UNIQUE_KEY_SETS option using the provided Function to split a table and column string into a Pair.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_RESULT_LIMIT

        public static final int DEFAULT_RESULT_LIMIT
        The default limit used for data source queries.
        See Also:
        Constant Field Values
      • DATA_SOURCE_QUERY_RESULT_LIMIT

        public static final java.lang.String DATA_SOURCE_QUERY_RESULT_LIMIT
        The option to define the limit for data source query results. Data source query results are kept in-memory so it is not recommended to set this limit to a high value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataSourceOptions

        public DataSourceOptions()
    • Method Detail

      • getUniqueKeySets

        public static java.util.Map<java.lang.String,​java.util.Set<java.util.Set<java.lang.String>>> getUniqueKeySets​(java.util.Properties options)
        Returns the parsed value of the UNIQUE_KEY_SETS option. Takes String of unique keys, grouped by parentheses, delimited by commas and a returns a Map from each referenced table to the set of key sets. Uses default function that splits table and column on last dot. e.g.:
         ("Table1"."Column1"), ("Table1"."Column3", "Table1"."Column4"), (mongocol.[unwind1;unwind2].unwind1.field1)
         
        is parsed to:
         {""Table1"" : [[""Column1""], [""Column3"", ""Column4""]]},
         {"mongocol.[unwind1;unwind2]" : [["unwind1.field1"]]}
      • getUniqueKeySets

        public static java.util.Map<java.lang.String,​java.util.Set<java.util.Set<java.lang.String>>> getUniqueKeySets​(java.util.Properties options,
                                                                                                                            java.util.function.Function<java.lang.String,​Pair<java.lang.String,​java.lang.String>> splitTableColumn)
        Parses the UNIQUE_KEY_SETS option using the provided Function to split a table and column string into a Pair. See: getUniqueKeySets(Properties)