Query Structure
The structure of a query in HelixQL
Basic Query Syntax
HelixQL is built to be declarative query language that uses a functional syntax to traverse the graph and vector data.
Here, we use Python to deliver the query payload to the HelixDB
server as a Query
object. It will then execute the Helix query.
Example Query Syntax:
Helix Components:
QUERY
: Keyword to start a query definitionquery_name
: Identifier for the queryparameters
: Input parameters in parenthesesType
: Type of the parameter (e.g. String, I32, F64, Boolean, [Type] or schema Node/Edge)=>
: Separates query header from bodyresult
: Result of the query<-
: Assignment operatorRETURN
: Specifies output values
Python Components:
class
: Defines a new classquery_name
: Identifier for the queryQuery
: Base class for all queries__init__
: Constructor for the classquery
: Sends the query payloadresponse
: Handles the response from the server