I have a void object which I declared, but want to get its class name is it possible??
item: detachable DB_ENTITY
db_connection.base_selection.query("SELECT * FROM " + item.generating_type.out)
Creating it is not what I want...
A type object (i.e. an object like the one returned by generating_type
for an existing object) can be obtained using curly braces enclosing the type name:
{MY_TYPE}
In your example it would be {attached like item}
if item
is a feature (of type detachable DB_ENTITY
to allow for a value Void
), or {DB_ENTITY}
if item
is a local variable, so that the whole expression would read in one of the following ways:
db_connection.base_selection.query("SELECT * FROM " + ({attached like item}).out)
db_connection.base_selection.query("SELECT * FROM " + ({DB_ENTITY}).out)
In the second case, the corresponding string would be equivalent to "SELECT * FROM DB_ENTITY"
.
I would use
item_type_anchor: detachable DB_ENTITY
-- `item_type_anchor' for Current.
and then
db_connection.base_selection.query ("SELECT * FROM " + ({like item_type_anchor}).generating_type.out)
This means that the feature `item_type_anchor' clearly communicates that it does not expect to be attached, but is there as a type-anchor reference only. Used with the static reference Alex pointed out, the story is now clear and concise. :-)