vaticle / typedb

TypeDB: the polymorphic database powered by types
https://typedb.com
Mozilla Public License 2.0
3.72k stars 337 forks source link

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

Closed grabl closed 3 years ago

grabl commented 5 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