I am new to TypeDB Studio. I have created a schema and committed it to my database. Is there a way to visualize the graph for the schema in Studio, before adding any data? I am working on the latest version (2.17.0) for macOS. Alternatively, is there any other compatible tool or client that can be used to visualize the schema?
I’ve created a clean new database, wrote the Quickstart schema example to database and tried out your query. I get this error:
## Error> [TQL03] TypeQL Error: There is a syntax error at line 1:
match $x sub thing;
^
no viable alternative at input 'match $x sub thing;'
If I add the instance data from the quickstart as well and try out some basic example queries, that does work. But then still I cannot query the schema it seems.
Can anyone help me out? (Perhaps I should create a new topic)
Great, that works indeed! Thank you very much.
the $_ is not documented anywhere yet, right? And are there plans to add the visualisation back again? It was really appealing and convenient in v2. Thank you again!
$t sub $_ will work only if there is an existing subtyping for a type. However, it won’t match emails and names (names are abstract, so whatever, but we do care about emails) in this schema:
define
attribute name @abstract, value string;
attribute first-name sub name;
attribute email value string;
There is no short equivalent of isa thing anymore, because all types are split to kinds more explicitly. @joshua gave the correct answer. In general, it’s like
match
{ entity $t; } or { relation $t; } or { attribute $t; }; $x isa $t;
This might be blocked by multiple rebindings of $t in 3.0, but should be available in 3.1 (RC is coming out this week).
$t sub $_ will work only if there is an existing subtyping for a type.
I don’t think this is true because a sub matches the type itself. It’s like the difference between sub* instead of sub+ in regex.
It worked fine for me here:
query-schema::read> match $sub sub $sup;
Finished validation and compilation...
Streaming answers...
----------
$sub | type parent
$sup | type parent
----------