3.1.4.3.2.1.1.4 Alter
The Alter command is used to alter an object that already exists on a server.
-
<xsd:complexType name="Alter"> <xsd:all> <xsd:element name="Object" type="ObjectReference" minOccurs="0" /> <xsd:element name="ObjectDefinition" type="MajorObject" /> </xsd:all> <xsd:attribute name="Scope" > <xsd:simpleType> <xsd:restriction base="xsd:string" > <xsd:enumeration value="Session" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="AllowCreate" type="xsd:boolean" /> <xsd:attribute name="ObjectExpansion" > <xsd:simpleType> <xsd:restriction base="xsd:string" > <xsd:enumeration value="ObjectProperties" /> <xsd:enumeration value="ExpandFull" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType>
The following table describes the XML elements allowed in the Alter command.
Element |
Default value |
Description |
---|---|---|
Object |
Server object |
The object to alter. The ObjectReference type is defined in section 3.1.4.3.2.1.1.1. |
ObjectDefinition |
[Required] |
The ObjectDefinition is the full XML that defines an object derived from MajorObject (2.2.4.2.2.1). Depending on the value of ObjectExpansion, objects contained by a major object MAY be defined with the XML. |
The following table describes the XML attributes allowed in the Alter command.
Attribute |
Default value |
Description |
---|---|---|
Scope |
Empty |
If Scope is specified as "Session", the object is altered as a session object. If this XML attribute is present, any value other than "Session", including an empty value, will return an error. |
AllowCreate |
False |
A Boolean that specifies what to do if the object does not exist. If true, the server creates a new object; if false, the server raises an error. |
ObjectExpansion |
"ObjectProperties" |
An enumeration value that specifies whether to alter only the object, or the object and all of its descendants. |
The return result type for the Alter command is xmla-e:emptyresult.