SchemaCommand Object
The SchemaCommand Object holds information about a command within a schema. It is accessible through the Schema Object exposed as a local variable called schema
.
The code snippet below shows how the commands object can be used:
for (i=0; i<schema.commands.count; i++)
{
log('schema.commands['+'].name ='+schema.commands[i].name);
log('schema.commands['+'].kind ='+schema.commands[i].kind);
log('schema.commands['+'].description ='+schema.commands[i].description);
log('schema.commands['+'].customAttributes ='+schema.commands[i].customAttributes);
log('schema.commands['+'].public ='+schema.commands[i].public);
}
Properties
statements
Contains an array of SchemaSQLStatement Object instances associated with this command. This contains the per-connection or per-connection type list of statements that this command has.
parameters
Contains an array of SchemaParameter Object instances associated with this command. This contains the list of input and output parameters that are used for this command.
where
Gets or sets the predefined where statement for this command as XML string, if set, it merges with any where condition passed from the client side.
whereBuilder
Gets or sets the unwrapped XML string for this command. This returns a WhereExpression (or null) version of the where property.
customAttributes
Represents custom attributes associated with this command. This can be set from the Schema Modeler and can contain any string data. The script can interpret it by accessing this field.
public
Gets or sets whether this command is publicly accessible. If not, any access to this command from the client will be denied. Generally, private commands are used from within the service itself, for example for access validation.
description
Represents the description text for this command.
name
Represents the name for this command.
kind
Returns the command value, this field is exposed in all schema sub elements and can be used to distinguish between them.