zeroql
v0.0.2
Published
A graphQL inspired graph database query language.
Downloads
3
Readme
ZeroQL
A graphQL inspired graph database query language.
Usage
Basic
- Query nodes with certain label :
User {
id,
name,
age
}
- Query nodes with certain attributes :
User( age:21 ){
id,
name,
age
}
Query Related Data
- Query optional related data
User( age:21 ){
id,
name,
assigned Task : {
id,
content
}
}
- Query related Data with certain attribute
User( age:21 ){
id,
name,
assigned static::Task( content: 'run' ): {
id,
content
}
}
query above will be parsed to :
{
type : 'User',
attrs : {
age :21
},
unfilledKeys : [],
fields : ['id', 'name'],
relations : [
{
name : 'assigned',
static : true,
reverse : false,
target : {
type : 'Task',
attrs : {
content : 'run'
},
fields : ['id','content']
unfilledKeys : [],
relations : []
}
}
]
}