This PR implements the ALTER command. We can use ALTER to rename schema properties, change their types, add or remove them. For example:
// Add a property named foo with type int[]
ALTER TYPE Person ADD PROPERTY foo int[];
// Removes the property named foo, if it exists
ALTER TYPE Person DROP PROPERTY foo;
// Changes the type of the property named foo to the new type, converting all values if applicable
ALTER TYPE Person CHANGE PROPERTY foo float[];
// Renames the property named foo to be named bar
ALTER TYPE Person RENAME PROPERTY foo bar;
CHANGE PROPERTY will convert types in a reasonable manner; if there is a way to convert values that makes sense, it does that conversion; otherwise, Graphene will simply choose the default value for the new type.
This PR implements the
ALTER
command. We can useALTER
to rename schema properties, change their types, add or remove them. For example:CHANGE PROPERTY
will convert types in a reasonable manner; if there is a way to convert values that makes sense, it does that conversion; otherwise, Graphene will simply choose the default value for the new type.cc @Davidpena