A common base class for the various degrees of Row1, Row2, etc.
| 83 | * etc. |
| 84 | */ |
| 85 | abstract class AbstractRow<R extends Record> |
| 86 | extends |
| 87 | AbstractQueryPart |
| 88 | implements |
| 89 | Row, |
| 90 | FieldsTrait, |
| 91 | SelectField<R> |
| 92 | { |
| 93 | |
| 94 | private static final Clause[] CLAUSES = { FIELD_ROW }; |
| 95 | |
| 96 | final FieldsImpl<R> fields; |
| 97 | |
| 98 | AbstractRow(SelectField<?>... fields) { |
| 99 | this(new FieldsImpl<>(fields)); |
| 100 | } |
| 101 | |
| 102 | AbstractRow(Collection<? extends SelectField<?>> fields) { |
| 103 | this(new FieldsImpl<>(fields)); |
| 104 | } |
| 105 | |
| 106 | AbstractRow(FieldsImpl<R> fields) { |
| 107 | super(); |
| 108 | |
| 109 | this.fields = fields; |
| 110 | } |
| 111 | |
| 112 | static final Keyword keyword(Scope ctx) { |
| 113 | switch (ctx.family()) { |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | default: |
| 119 | return K_ROW; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | static final Name name(Scope ctx) { |
| 124 | switch (ctx.family()) { |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | default: |
| 130 | return N_ROW; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // ------------------------------------------------------------------------ |
| 135 | // XXX: SelectField API |
| 136 | // ------------------------------------------------------------------------ |
| 137 | |
| 138 | final RowAsField<Row, R> rf() { |
| 139 | return new RowAsField<Row, R>(this); |
| 140 | } |
| 141 | |
| 142 | @Override |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…