forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
SQL Alter Property
lvca edited this page Dec 22, 2012
·
1 revision
The SQL Alter Property command alters a class's property in the schema.
ALTER PROPERTY <class>.<property> <attribute-name> <attribute-value>
Where:
- class is the class owner of the property to change
- property is the property name to change
- attribute-name, is the attribute name to alter
- attribute-value, is the new attribute value to set
Supported attribute names are:
- LINKEDCLASS, the linked class name. Accepts a string as value. NULL to remove it
- LINKEDTYPE, the linked type name between those supported: Boolean, Integer, Short, Long, Float, Double, Datetime, String, Binary, Embedded, EmbeddedList, EmbeddedSet, EmbeddedMap, Link, LinkList, LinkSet, LinkMap, Byte, Transient, Date. Accepts a string as value. NULL to remove it
- MIN, the minimum value as constraint. Accepts strings, numbers or dates as value. NULL to remove it
- MANDATORY, true if the property is mandatory. Accepts "true" or "false"
- MAX, the maximum value as constraint. Accepts strings, numbers or dates as value. NULL to remove it
- NAME, the class name. Accepts a string as value
- NOTNULL, the property can't be null. Accepts "true" or "false"
- REGEXP the regular expression as constraint. Accepts a string as value. NULL to remove it
- TYPE, the type between those supported: Boolean, Integer, Short, Long, Float, Double, Datetime, String, Binary, Embedded, EmbeddedList, EmbeddedSet, EmbeddedMap, Link, LinkList, LinkSet, LinkMap, Byte, Transient, Date. Accepts a string as value. NULL to remove it
-
CUSTOM Set custom properties. Syntax is
<name> = <value>
. Example: stereotype = icon
ALTER PROPERTY Account.age NAME born
ALTER PROPERTY Account.age MANDATORY true
ALTER PROPERTY Account.gender REGEXP [M|F]
alter property Foo.bar1 custom stereotype visible
To create a property use the Create Property command, to remove a property use the Drop Property command.
To know more about other SQL commands look at SQL commands.
This is a command of the Orient console. To know all the commands go to Console-Commands.