Module org.jooq

Class PostgresDSL

    • Constructor Detail

      • PostgresDSL

        protected PostgresDSL()
        No instances
    • Method Detail

      • arrayOverlap

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Condition arrayOverlap​(T[] left,
                                                          T[] right)
        The PostgreSQL array1 && array2 overlap operator.

        Example:

         true = array[1, 2, 3] && array[3, 4, 5]
         
      • arrayOverlap

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Condition arrayOverlap​(T[] left,
                                                          Field<T[]> right)
        The PostgreSQL array1 && array2 overlap operator.

        Example:

         true = array[1, 2, 3] && array[3, 4, 5]
         
      • arrayOverlap

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Condition arrayOverlap​(Field<T[]> left,
                                                          T[] right)
        The PostgreSQL array1 && array2 overlap operator.

        Example:

         true = array[1, 2, 3] && array[3, 4, 5]
         
      • arrayOverlap

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Condition arrayOverlap​(Field<T[]> left,
                                                          Field<T[]> right)
        The PostgreSQL array1 && array2 overlap operator.

        Example:

         true = array[1, 2, 3] && array[3, 4, 5]
         
      • array

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> array​(Select<? extends Record1<T>> select)
        The PostgreSQL array(select) function.

        Example:

         {1, 2, 3} = array(select 1 union select 2 union select 3)
         
      • arrayAppend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayAppend​(T[] array,
                                                          T value)
        The PostgreSQL array_append(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_append(ARRAY[1, 2], 3)
         
      • arrayAppend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayAppend​(T[] array,
                                                          Field<T> value)
        The PostgreSQL array_append(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_append(ARRAY[1, 2], 3)
         
      • arrayAppend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayAppend​(Field<T[]> array,
                                                          T value)
        The PostgreSQL array_append(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_append(ARRAY[1, 2], 3)
         
      • arrayAppend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayAppend​(Field<T[]> array,
                                                          Field<T> value)
        The PostgreSQL array_append(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_append(ARRAY[1, 2], 3)
         
      • arrayPrepend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayPrepend​(T value,
                                                           T[] array)
        The PostgreSQL array_prepend(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_prepend(1, ARRAY[2, 3])
         
      • arrayPrepend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayPrepend​(Field<T> value,
                                                           T[] array)
        The PostgreSQL array_prepend(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_prepend(1, ARRAY[2, 3])
         
      • arrayPrepend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayPrepend​(T value,
                                                           Field<T[]> array)
        The PostgreSQL array_prepend(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_prepend(1, ARRAY[2, 3])
         
      • arrayPrepend

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayPrepend​(Field<T> value,
                                                           Field<T[]> array)
        The PostgreSQL array_prepend(anyarray, anyelement) function.

        Example:

         {1, 2, 3} = array_prepend(1, ARRAY[2, 3])
         
      • arrayCat

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayCat​(T[] array1,
                                                       T[] array2)
        The PostgreSQL array_cat(anyarray, anyelement) function.

        Example:

         {1, 2, 3, 4, 5} = array_cat(ARRAY[1, 2], ARRAY[3, 4, 5])
         
      • arrayCat

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayCat​(T[] array1,
                                                       Field<T[]> array2)
        The PostgreSQL array_cat(anyarray, anyelement) function.

        Example:

         {1, 2, 3, 4, 5} = array_cat(ARRAY[1, 2], ARRAY[3, 4, 5])
         
      • arrayCat

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayCat​(Field<T[]> array1,
                                                       T[] array2)
        The PostgreSQL array_cat(anyarray, anyelement) function.

        Example:

         {1, 2, 3, 4, 5} = array_cat(ARRAY[1, 2], ARRAY[3, 4, 5])
         
      • arrayCat

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayCat​(Field<T[]> array1,
                                                       Field<T[]> array2)
        The PostgreSQL array_cat(anyarray, anyelement) function.

        Example:

         {1, 2, 3, 4, 5} = array_cat(ARRAY[1, 2], ARRAY[3, 4, 5])
         
      • arrayRemove

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayRemove​(T[] array,
                                                          T element)
        The PostgreSQL array_remove(anyarray, anyelement) function.

        Example:

         {1,3} = array_remove(ARRAY[1,2,3,2], 2)
         
      • arrayRemove

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayRemove​(Field<T[]> array,
                                                          T element)
        The PostgreSQL array_remove(anyarray, anyelement) function.

        Example:

         {1,3} = array_remove(ARRAY[1,2,3,2], 2)
         
      • arrayRemove

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayRemove​(T[] array,
                                                          Field<T> element)
        The PostgreSQL array_remove(anyarray, anyelement) function.

        Example:

         {1,3} = array_remove(ARRAY[1,2,3,2], 2)
         
      • arrayRemove

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayRemove​(Field<T[]> array,
                                                          Field<T> element)
        The PostgreSQL array_remove(anyarray, anyelement) function.

        Example:

         {1,3} = array_remove(ARRAY[1,2,3,2], 2)
         
      • arrayReplace

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayReplace​(T[] array,
                                                           T search,
                                                           T replace)
        The PostgreSQL array_replace(anyarray, anyelement, anyelement) function.

        Example:

         {1,2,3,4} = array_replace(ARRAY[1,2,5,4], 5, 3)
         
      • arrayReplace

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayReplace​(T[] array,
                                                           Field<T> search,
                                                           Field<T> replace)
        The PostgreSQL array_replace(anyarray, anyelement, anyelement) function.

        Example:

         {1,2,3,4} = array_replace(ARRAY[1,2,5,4], 5, 3)
         
      • arrayReplace

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayReplace​(Field<T[]> array,
                                                           T search,
                                                           T replace)
        The PostgreSQL array_replace(anyarray, anyelement, anyelement) function.

        Example:

         {1,2,3,4} = array_replace(ARRAY[1,2,5,4], 5, 3)
         
      • arrayReplace

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayReplace​(Field<T[]> array,
                                                           Field<T> search,
                                                           Field<T> replace)
        The PostgreSQL array_replace(anyarray, anyelement, anyelement) function.

        Example:

         {1,2,3,4} = array_replace(ARRAY[1,2,5,4], 5, 3)
         
      • arrayFill

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayFill​(T value,
                                                        Integer[] dimensions)
        The PostgreSQL array_fill(anyelement, int[]) function.

        Example:

         {7,7,7} = array_fill(7, ARRAY[3])
         
      • arrayFill

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayFill​(Field<T> value,
                                                        Integer[] dimensions)
        The PostgreSQL array_fill(anyelement, int[]) function.

        Example:

         {7,7,7} = array_fill(7, ARRAY[3])
         
      • arrayFill

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayFill​(T value,
                                                        Field<Integer[]> dimensions)
        The PostgreSQL array_fill(anyelement, int[]) function.

        Example:

         {7,7,7} = array_fill(7, ARRAY[3])
         
      • arrayFill

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayFill​(T value,
                                                        Integer[] dimensions,
                                                        Integer[] bounds)
        The PostgreSQL array_fill(anyelement, int[], int[]) function.

        Example:

         [2:4]={7,7,7} = array_fill(7, ARRAY[3], ARRAY[2])
         
      • arrayFill

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static <T> @NotNull Field<T[]> arrayFill​(Field<T> value,
                                                        Integer[] dimensions,
                                                        Integer[] bounds)
        The PostgreSQL array_fill(anyelement, int[], int[]) function.

        Example:

         [2:4]={7,7,7} = array_fill(7, ARRAY[3], ARRAY[2])
         
      • arrayLength

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static @NotNull Field<Integer> arrayLength​(Object[] array)
        The PostgreSQL array_length(anyarray, int) function.

        jOOQ currently doesn't support multi-dimensional arrays, so the dimension will always be 1.

        Example:

         3 = array_length(array[1,2,3], 1)
         
      • arrayLength

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static @NotNull Field<Integer> arrayLength​(Field<? extends Object[]> array)
        The PostgreSQL array_length(anyarray, int) function.

        jOOQ currently doesn't support multi-dimensional arrays, so the dimension will always be 1.

        Example:

         3 = array_length(array[1,2,3], 1)
         
      • arrayToString

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static @NotNull Field<String> arrayToString​(Object[] array,
                                                           String delimiter)
        The PostgreSQL array_to_string(anyarray, delimiter) function.

        Example:

         '1~^~2~^~3' = array_to_string(ARRAY[1, 2, 3], '~^~')
         
      • stringToArray

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static @NotNull Field<String[]> stringToArray​(String string,
                                                             String delimiter)
        The PostgreSQL string_to_array(anyarray, delimiter) function.

        Example:

         {xx,NULL,zz} = string_to_array('xx~^~yy~^~zz', '~^~', 'yy')
         
      • stringToArray

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static @NotNull Field<String[]> stringToArray​(String string,
                                                             String delimiter,
                                                             String nullString)
        The PostgreSQL string_to_array(anyarray, delimiter) function.

        Example:

         {xx,NULL,zz} = string_to_array('xx~^~yy~^~zz', '~^~', 'yy')
         
      • only

        @NotNull
        @Support({AURORA_POSTGRES,POSTGRES})
        public static @NotNull Table<Record> only​(Table<?> table)
        Get the PostgreSQL-specific ONLY [table] clause for use with table inheritance.

        Example:

         SELECT * FROM ONLY parent_table