typedb / typedb

TypeDB: the power of programming, in your database
https://typedb.com
Mozilla Public License 2.0
3.8k stars 338 forks source link

Graql: Query Builder needs to take in Graql concepts #3953

Closed grabl closed 3 years ago

grabl commented 6 years ago

This issue was originally posted by @jmsfltchr on 2018-06-05 15:51.

For example, right now isa() only accepts String or VarPattern. So, right now we have to do:

 QueryBuilder qb = this.tx.graql(); query = qb.insert(var("x").isa(this.strategy.getType().getLabel().getValue()); 

Where of course

this.strategy.getType()

returns a Type. We want to do:

 QueryBuilder qb = this.tx.graql(); query = qb.insert(var("x").isa(this.strategy.getType()) 
flyingsilverfin commented 3 years ago

We shouldn't make typeql-lang-java depend on typedb-client-java so this should not be implemented