Module org.jooq
Package org.jooq

Interface SelectField<T>

All Superinterfaces:
Named, QueryPart, SelectFieldOrAsterisk, Serializable, Typed<T>
All Known Subinterfaces:
AggregateFilterStep<T>, AggregateFunction<T>, ArrayAggOrderByStep<T>, CaseConditionStep<T>, CaseWhenStep<V,T>, CommonTableExpression<R>, Condition, False, Field<T>, GroupConcatOrderByStep, GroupConcatSeparatorStep, JSONArrayAggNullStep<T>, JSONArrayAggOrderByStep<J>, JSONArrayAggReturningStep<T>, JSONArrayNullStep<T>, JSONArrayReturningStep<T>, JSONExistsOnStep, JSONObjectAggNullStep<T>, JSONObjectAggReturningStep<T>, JSONObjectNullStep<T>, JSONObjectReturningStep<T>, JSONTableColumnPathStep, JSONTableColumnsStep, JSONValueOnStep<J>, JSONValueReturningStep<T>, LikeEscapeStep, Null, Param<T>, Parameter<T>, ParamOrVariable<T>, QOM.Abs<T>, QOM.Acos, QOM.Acosh, QOM.Acoth, QOM.Add<T>, QOM.And, QOM.AnyValue<T>, QOM.Array<T>, QOM.ArrayAgg<T>, QOM.ArrayGet<T>, QOM.ArrayQuery<T>, QOM.Ascii, QOM.Asin, QOM.Asinh, QOM.Atan, QOM.Atan2, QOM.Atanh, QOM.Avg, QOM.BitAnd<T>, QOM.BitAndAgg<T>, QOM.BitCount, QOM.BitLength, QOM.BitNand<T>, QOM.BitNandAgg<T>, QOM.BitNor<T>, QOM.BitNorAgg<T>, QOM.BitNot<T>, QOM.BitOr<T>, QOM.BitOrAgg<T>, QOM.BitXNor<T>, QOM.BitXNorAgg<T>, QOM.BitXor<T>, QOM.BitXorAgg<T>, QOM.BoolAnd, QOM.BoolOr, QOM.Cardinality, QOM.Cast<T>, QOM.Ceil<T>, QOM.CharLength, QOM.Choose<T>, QOM.Chr, QOM.Coalesce<T>, QOM.Coerce<T>, QOM.Collated, QOM.Collect<T,A>, QOM.CombinedCondition, QOM.CompareCondition<T>, QOM.Concat, QOM.ConditionAsField, QOM.ConnectByIsCycle, QOM.ConnectByIsLeaf, QOM.ConnectByRoot<T>, QOM.Contains<T>, QOM.ContainsIgnoreCase<T>, QOM.Convert<T>, QOM.Corr, QOM.Cos, QOM.Cosh, QOM.Cot, QOM.Coth, QOM.Count, QOM.CountTable, QOM.CovarPop, QOM.CovarSamp, QOM.CumeDist, QOM.CurrentCatalog, QOM.CurrentDate<T>, QOM.CurrentSchema, QOM.CurrentTime<T>, QOM.CurrentTimestamp<T>, QOM.CurrentUser, QOM.DataChangeDeltaTable<R>, QOM.DateAdd<T>, QOM.Default<T>, QOM.Degrees, QOM.Deleting, QOM.DenseRank, QOM.DerivedTable<R>, QOM.Digits, QOM.Div<T>, QOM.Dual, QOM.EndsWith<T>, QOM.EndsWithIgnoreCase<T>, QOM.Eq<T>, QOM.Euler, QOM.Excluded<T>, QOM.Exists, QOM.Exp, QOM.Extract, QOM.FieldAlias<T>, QOM.FieldCondition, QOM.FieldFunction<T>, QOM.FirstValue<T>, QOM.Floor<T>, QOM.Function<T>, QOM.Ge<T>, QOM.GenerateSeries<T>, QOM.Greatest<T>, QOM.Gt<T>, QOM.Iif<T>, QOM.In<T>, QOM.InList<T>, QOM.Inserting, QOM.IsDistinctFrom<T>, QOM.IsDocument, QOM.IsJson, QOM.IsNotDistinctFrom<T>, QOM.IsNotDocument, QOM.IsNotJson, QOM.IsNotNull, QOM.IsNull, QOM.JSONArray<T>, QOM.JSONArrayAgg<J>, QOM.JSONObject<T>, QOM.JSONObjectAgg<J>, QOM.Lag<T>, QOM.LastValue<T>, QOM.Lateral<R>, QOM.Le<T>, QOM.Lead<T>, QOM.Least<T>, QOM.Left, QOM.Level, QOM.Like, QOM.LikeIgnoreCase, QOM.LinkedTable<R>, QOM.Ln, QOM.Log, QOM.Log10, QOM.Lower, QOM.Lpad, QOM.Lt<T>, QOM.Ltrim, QOM.Max<T>, QOM.Md5, QOM.Median, QOM.Min<T>, QOM.Mod<T>, QOM.Mode<T>, QOM.Mul<T>, QOM.Multiset<R>, QOM.MultisetAgg<R>, QOM.Ne<T>, QOM.Neg<T>, QOM.Not, QOM.NotField, QOM.NotIn<T>, QOM.NotInList<T>, QOM.NotLike, QOM.NotLikeIgnoreCase, QOM.NotSimilarTo, QOM.NthValue<T>, QOM.Ntile, QOM.Nullif<T>, QOM.Nvl<T>, QOM.Nvl2<T>, QOM.OctetLength, QOM.Or, QOM.Overlay, QOM.PercentRank, QOM.Pi, QOM.PlusJoin<T>, QOM.Position, QOM.Power, QOM.Prior<T>, QOM.Product, QOM.QualifiedRowid, QOM.Radians, QOM.Rand, QOM.Rank, QOM.RatioToReport, QOM.RegexpLike, QOM.RegrAvgX, QOM.RegrAvgY, QOM.RegrCount, QOM.RegrIntercept, QOM.RegrR2, QOM.RegrSlope, QOM.RegrSxx, QOM.RegrSxy, QOM.RegrSyy, QOM.Repeat, QOM.Replace, QOM.Reverse, QOM.Right, QOM.Round<T>, QOM.RowAsField<R>, QOM.RowIsNotNull, QOM.RowIsNull, QOM.Rownum, QOM.RowNumber, QOM.RowOverlaps, QOM.RowsFrom, QOM.Rpad, QOM.Rtrim, QOM.ScalarSubquery<T>, QOM.SelectIsNotNull, QOM.SelectIsNull, QOM.Shl<T>, QOM.Shr<T>, QOM.Sign, QOM.SimilarTo, QOM.Sin, QOM.Sinh, QOM.Space, QOM.SplitPart, QOM.Sqrt, QOM.Square<T>, QOM.StArea, QOM.StartsWith<T>, QOM.StartsWithIgnoreCase<T>, QOM.StAsBinary, QOM.StAsText, QOM.StCentroid, QOM.StContains<T>, QOM.StCrosses, QOM.StddevPop, QOM.StddevSamp, QOM.StDifference<T>, QOM.StDisjoint<T>, QOM.StDistance<T>, QOM.StEndPoint<T>, QOM.StEquals<T>, QOM.StExteriorRing, QOM.StGeometryN<T>, QOM.StGeometryType, QOM.StGeomFromText, QOM.StGeomFromWKB, QOM.StInteriorRingN, QOM.StIntersection<T>, QOM.StIntersects<T>, QOM.StIsClosed, QOM.StIsEmpty, QOM.StLength, QOM.StNumGeometries, QOM.StNumInteriorRings, QOM.StNumPoints, QOM.StOverlaps<T>, QOM.StPointN<T>, QOM.StSrid, QOM.StStartPoint<T>, QOM.StTouches<T>, QOM.StUnion<T>, QOM.StWithin<T>, QOM.StX, QOM.StY, QOM.StZ, QOM.Sub<T>, QOM.Substring, QOM.SubstringIndex, QOM.Sum, QOM.SysConnectByPath, QOM.TableAlias<R>, QOM.TableAsField<R>, QOM.TableEq<R>, QOM.TableNe<R>, QOM.Tan, QOM.Tanh, QOM.Tau, QOM.TimestampDiff<T>, QOM.ToChar, QOM.ToDate, QOM.ToHex, QOM.ToTimestamp, QOM.Translate, QOM.Trim, QOM.Trunc<T>, QOM.Unique, QOM.Updating, QOM.Upper, QOM.Uuid, QOM.Values<R>, QOM.VarPop, QOM.VarSamp, QOM.WidthBucket<T>, QOM.WindowFunction<T>, QOM.XMLAgg, QOM.XMLComment, QOM.XMLConcat, QOM.XMLDocument, QOM.XMLElement, QOM.XMLExists, QOM.XMLForest, QOM.XMLParse, QOM.XMLPi, QOM.XMLQuery, QOM.XMLSerialize<T>, Row1<T1>, Row10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>, Row11<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>, Row12<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>, Row13<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>, Row14<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>, Row15<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>, Row16<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>, Row17<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>, Row18<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>, Row19<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>, Row2<T1,T2>, Row20<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>, Row21<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>, Row22<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>, Row3<T1,T2,T3>, Row4<T1,T2,T3,T4>, Row5<T1,T2,T3,T4,T5>, Row6<T1,T2,T3,T4,T5,T6>, Row7<T1,T2,T3,T4,T5,T6,T7>, Row8<T1,T2,T3,T4,T5,T6,T7,T8>, Row9<T1,T2,T3,T4,T5,T6,T7,T8,T9>, RowN, Table<R>, TableField<R,T>, TableOnConditionStep<R>, TableOptionalOnStep<R>, True, UDTField<R,T>, Variable<T>, WindowBeforeOverStep<T>, WindowExcludeStep<T>, WindowFinalStep<T>, WindowOrderByStep<T>, WindowPartitionByStep<T>, WindowRowsStep<T>, XMLAggOrderByStep<T>, XMLTableColumnPathStep, XMLTableColumnsStep
All Known Implementing Classes:
CustomCondition, CustomField, CustomTable, TableImpl

public non-sealed interface SelectField<T> extends SelectFieldOrAsterisk, Named, Typed<T>
A QueryPart to be used exclusively in SELECT clauses.

Instances of this type cannot be created directly, only of its subtypes.

Author:
Lukas Eder
  • Method Details

    • as

      @NotNull @Support @NotNull SelectField<T> as(String alias)
      Create an alias for this field.

      Note that the case-sensitivity of the returned field depends on Settings.getRenderQuotedNames(). By default, field aliases are quoted, and thus case-sensitive in many SQL dialects!

      Parameters:
      alias - The alias name
      Returns:
      The field alias
    • as

      @NotNull @Support @NotNull SelectField<T> as(Name alias)
      Create an alias for this field.

      Note that the case-sensitivity of the returned field depends on Settings.getRenderQuotedNames() and the Name. By default, field aliases are quoted, and thus case-sensitive in many SQL dialects - use DSL.unquotedName(String...) for case-insensitive aliases.

      If the argument Name.getName() is qualified, then the Name.last() part will be used.

      Parameters:
      alias - The alias name
      Returns:
      The field alias
    • as

      @NotNull @Support @NotNull SelectField<T> as(Field<?> otherField)
      Create an alias for this field based on another field's name.
      Parameters:
      otherField - The other field whose name this field is aliased with.
      Returns:
      The field alias.
    • convert

      @NotNull <U> @NotNull SelectField<U> convert(Binding<T,U> binding)
      Apply an ad-hoc data type Binding to this field expression.

      Rather than attaching data type bindings at code generation time, or creating cumbersome expressions using DataType.asConvertedDataType(Binding), this method allows for creating a derived field expression with an ad-hoc data type binding for single query usage.

      Type Parameters:
      U - The user type.
      Parameters:
      binding - The binding to be applied on any operations using this field.
      Returns:
      A derived field expression using a new binding.
    • convert

      @NotNull <U> @NotNull SelectField<U> convert(Converter<T,U> converter)
      Apply an ad-hoc data type Converter to this field expression.

      Rather than attaching data type converters at code generation time, or creating cumbersome expressions using DataType.asConvertedDataType(Converter), this method allows for creating a derived field expression with an ad-hoc data type converter for single query usage.

      Type Parameters:
      U - The user type.
      Parameters:
      converter - The converter to be applied on any operations using this field.
      Returns:
      A derived field expression using a new converter.
    • convert

      @NotNull <U> @NotNull SelectField<U> convert(Class<U> toType, Function<? super T,? extends U> from, Function<? super U,? extends T> to)
      Apply an ad-hoc data type Converter to this field expression.

      Rather than attaching data type converters at code generation time, or creating cumbersome expressions using DataType.asConvertedDataType(Class, Function, Function), this method allows for creating a derived field expression with an ad-hoc data type converter for single query usage.

      Type Parameters:
      U - The user type.
      Parameters:
      converter - The converter to be applied on any operations using this field.
      Returns:
      A derived field expression using a new converter.
    • convertFrom

      @NotNull <U> @NotNull SelectField<U> convertFrom(Class<U> toType, Function<? super T,? extends U> from)
      Apply an ad-hoc read-only data type Converter to this field expression.

      Rather than attaching data type converters at code generation time, or creating cumbersome expressions using DataType.asConvertedDataTypeFrom(Class, Function), this method allows for creating a derived field expression with an ad-hoc data type converter for single query usage.

      Type Parameters:
      U - The user type.
      Parameters:
      converter - The read-only converter to be applied on any operations using this field.
      Returns:
      A derived field expression using a new converter.
    • convertFrom

      @NotNull <U> @NotNull SelectField<U> convertFrom(Function<? super T,? extends U> from)
      Apply an ad-hoc read-only data type Converter to this field expression.

      Rather than attaching data type converters at code generation time, or creating cumbersome expressions using DataType.asConvertedDataTypeFrom(Class, Function), this method allows for creating a derived field expression with an ad-hoc data type converter for single query usage.

      Unlike convertFrom(Class, Function), this method attempts to work without an explicit Class reference for the underlying Converter.toType(). There may be some edge cases where this doesn't work, e.g. when nesting rows in arrays, the class literal is required for reflective array creation.

      Type Parameters:
      U - The user type.
      Parameters:
      converter - The read-only converter to be applied on any operations using this field.
      Returns:
      A derived field expression using a new converter.
    • convertTo

      @NotNull <U> @NotNull SelectField<U> convertTo(Class<U> toType, Function<? super U,? extends T> to)
      Apply an ad-hoc write-only data type Converter to this field expression.

      Rather than attaching data type converters at code generation time, or creating cumbersome expressions using DataType.asConvertedDataTypeTo(Class, Function), this method allows for creating a derived field expression with an ad-hoc data type converter for single query usage.

      Type Parameters:
      U - The user type.
      Parameters:
      converter - The write-only converter to be applied on any operations using this field.
      Returns:
      A derived field expression using a new converter.
    • convertTo

      @NotNull <U> @NotNull SelectField<U> convertTo(Function<? super U,? extends T> to)
      Apply an ad-hoc write-only data type Converter to this field expression.

      Rather than attaching data type converters at code generation time, or creating cumbersome expressions using DataType.asConvertedDataTypeTo(Class, Function), this method allows for creating a derived field expression with an ad-hoc data type converter for single query usage.

      Unlike convertTo(Class, Function), this method attempts to work without an explicit Class reference for the underlying Converter.toType(). There may be some edge cases where this doesn't work, e.g. when nesting rows in arrays, the class literal is required for reflective array creation.

      Type Parameters:
      U - The user type.
      Parameters:
      converter - The write-only converter to be applied on any operations using this field.
      Returns:
      A derived field expression using a new converter.