Model
Return model that will be returned in the query execution.
Params
parameter | short | describe |
---|---|---|
workspace | -w | project path. |
query | -q | Query expression |
output | -o | Generates an output according to the following possible values [json |
url | -u | When working with a client you must pass the url of the service |
Example
lambdaorm model -o beautiful -q "Orders.filter(p=>p.id==id).include(p=>p.details)"
Result:
[
{
"name": "id",
"type": "integer"
},
{
"name": "customerId",
"type": "string"
},
{
"name": "employeeId",
"type": "integer"
},
{
"name": "orderDate",
"type": "dateTime"
},
{
"name": "requiredDate",
"type": "date"
},
{
"name": "shippedDate",
"type": "date"
},
{
"name": "shipViaId",
"type": "integer"
},
{
"name": "freight",
"type": "decimal"
},
{
"name": "name",
"type": "string"
},
{
"name": "address",
"type": "string"
},
{
"name": "city",
"type": "string"
},
{
"name": "region",
"type": "string"
},
{
"name": "postalCode",
"type": "string"
},
{
"name": "country",
"type": "string"
},
{
"name": "details",
"type": "Orders.details[]",
"children": [
{
"name": "orderId",
"type": "integer"
},
{
"name": "productId",
"type": "integer"
},
{
"name": "unitPrice",
"type": "decimal"
},
{
"name": "quantity",
"type": "decimal"
},
{
"name": "discount",
"type": "decimal"
},
{
"name": "LambdaOrmParentId",
"type": "integer"
}
]
}
]