SELECT * FROM person WHERE primary_id=="Tom"SELECT name FROM person WHERE state=="ca"SELECT name, age FROM person WHERE age >30
结果是JSON格式,如下所示:
GSQL shell
GSQL > SELECT * FROM person WHERE primary_id=="Tom"[{"v_id": "Tom","attributes": {"gender": "male","name": "Tom","state": "ca","age": 40 },"v_type": "person"}]GSQL > SELECT name FROM person WHERE state=="ca"[ {"v_id": "Amily","attributes": {"name": "Amily"},"v_type": "person" }, {"v_id": "Tom","attributes": {"name": "Tom"},"v_type": "person" }]GSQL > SELECT name, age FROM person WHERE age >30[ {"v_id": "Tom","attributes": {"name": "Tom","age": 40 },"v_type": "person" }, {"v_id": "Dan","attributes": {"name": "Dan","age": 34 },"v_type": "person" }]
[tigergraph@localhost ~]$ gadmin status graph -v
verbose is ON
=== graph ===
[m1 ][GRAPH][MSG ] Graph was loaded (/usr/local/tigergraph/gstore/0/part/): partition size is 4.00KiB, SchemaVersion: 0, VertexCount: 7, NumOfSkippedVertices: 0, NumOfDeletedVertices: 0, EdgeCount: 14
[m1 ][GRAPH][INIT] True
[INFO ][GRAPH][MSG ] Above vertex and edge counts are for internal use which show approximate topology size of the local graph partition. Use DML to get the correct graph topology information
[SUMMARY][GRAPH] graph is ready