You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/actions/QueryAction.adoc
+70-6Lines changed: 70 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,31 +155,88 @@ new QFilterOrderBy()
155
155
----
156
156
157
157
==== QueryJoin
158
-
* `joinTable` - *String, required* - Name of the table that is being joined in to the existing query.
158
+
* `joinTable` - *String, required (though inferrable)* - Name of the table that is being joined in to the existing query.
159
159
** Will be inferred from *joinMetaData*, if *joinTable* is not set when *joinMetaData* gets set.
160
-
* `baseTableOrAlias` - *String, required* - Name of a table (or an alias) already defined in the query, to which the *joinTable* will be joined.
160
+
* `baseTableOrAlias` - *String, required (though inferrable)* - Name of a table (or an alias) already defined in the query, to which the *joinTable* will be joined.
161
161
** Will be inferred from *joinMetaData*, if *baseTableOrAlias* is not set when *joinMetaData* gets set (which will only use the leftTableName from the joinMetaData - never an alias).
162
162
* `joinMetaData` - *QJoinMetaData object* - Optional specification of a {link-join} in the current QInstance.
163
163
If not set, will be looked up at runtime based on *baseTableOrAlias* and *joinTable*.
164
164
** If set before *baseTableOrAlias* and *joinTable*, then they will be set based on the *leftTable* and *rightTable* in this object.
165
165
* `alias` - *String* - Optional (unless multiple instances of the same table are being joined together, when it becomes required).
166
166
Behavior based on SQL `FROM` clause aliases.
167
167
If given, must be used as the part before the dot in field name specifications throughout the rest of the query input.
168
-
* `select` - *boolean, default: false* - Specify whether fields from the *rightTable* should be selected by the query.
168
+
* `select` - *boolean, default: false* - Specify whether fields from the *joinTable* should be selected by the query.
169
169
If *true*, then the `QRecord` objects returned by this query will have values with corresponding to the (table-or-alias `.` field-name) form.
170
170
* `type` - *Enum of INNER, LEFT, RIGHT, FULL, default: INNER* - specifies the SQL-style type of join being performed.
171
171
172
172
[source,java]
173
-
.QueryJoin definition examples:
173
+
.Basic QueryJoin usage example:
174
174
----
175
-
// selecting from an "orderLine" table - then join to its corresponding "order" table
175
+
// selecting from an "orderLine" table, joined to its corresponding (parent) "order" table
.Implicit QueryJoin, where unambiguous and required by QQueryFilter
257
+
----
258
+
// TODO finish and verify
259
+
queryInput.withTableName("order");
260
+
----
261
+
198
262
=== QueryOutput
199
263
* `records` - *List of QRecord* - List of 0 or more records that match the query filter.
200
264
** _Note: If a *recordPipe* was supplied to the QueryInput, then calling `queryOutput.getRecords()` will result in an `IllegalStateException` being thrown - as the records were placed into the pipe as they were fetched, and cannot all be accessed as a single list._
0 commit comments