public class JsonView extends JsonTable
Like base class JsonTable,
occurs within JsonMapSchema.tables.
A view is modifiable if contains only SELECT, FROM, WHERE (no JOIN, aggregation or sub-queries) and every column:
The second clause allows Calcite to automatically provide the correct
value for hidden columns. It is useful in, say, a multi-tenant environment,
where the tenantId column is hidden, mandatory (NOT NULL), and has a
constant value for a particular view.
Errors regarding modifiable views:
Description of schema elements| Modifier and Type | Field and Description |
|---|---|
Boolean |
modifiable
Whether this view should allow INSERT requests.
|
List<String> |
path
Schema name(s) to use when resolving query.
|
Object |
sql
SQL query that is the definition of the view.
|
| Constructor and Description |
|---|
JsonView() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ModelHandler handler) |
String |
getSql()
Returns the SQL query as a string, concatenating a list of lines if
necessary.
|
String |
toString() |
public Object sql
Must be a string or a list of strings (which are concatenated into a multi-line SQL string, separated by newlines).
public List<String> path
If not specified, defaults to current schema.
public Boolean modifiable
The values have the following meanings:
The default value is null.
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.