Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

vaticle/typeql-lang-java

Repository files navigation

DEPRACATED: This repository has been merged into vaticle/typeql


Grabl GitHub release Discord Discussion Forum Stack Overflow Stack Overflow

TypeQL Language Library for Java

TypeQL language library for Java allows you to construct TypeQL queries programmatically, as opposed to manual string concatenations. For example, take the following native TypeQL query.

match $x isa person, has name "alice", has age 32;

The native TypeQL query above can be constructed programmatically in Java using this library, in the following way.

TypeQL.match(var("x").isa("person").has("name", "alice").has("age", 32));

You can learn more about TypeQL Language Library for Java from docs.vaticle.com. You can find TypeDB and TypeQL repositories at vaticle/typedb and vaticle/typeql.

Importing TypeQL Language Library through Maven

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>{version}</version>
    </dependency>
</dependencies>

Replace {version} with the version number, in which you can find the latest on TypeQL's Maven Repository. Further documentation: http://docs.vaticle.com/docs/client-api/java#typeql

Building TypeQL from Source

Note: You don't need to compile TypeQL from source if you just want to use it in your code. See the "Importing TypeQL" section above.

  1. Make sure you have the following dependencies installed on your machine:

  2. Build the JAR:

    a) to build the native/raw JAR:

    bazel build//:typeql
    

    The Java library JAR will be produced at: bazel-bin/libclient-java.jar

    b) to build the JAR for a Maven application:

    bazel build //:assemble-maven
    

    The Maven JAR and POM will be produced at:

    bazel-bin/java/com.vaticle.typeql:lang.jar
    bazel-bin/java/pom.xml
    

Contributions

TypeDB & TypeQL has been built using various open-source Graph and Distributed Computing frameworks throughout its evolution. Today TypeDB & TypeQL is built using RocksDB, ANTLR, SCIP, Bazel, GRPC, and ZeroMQ, and Caffeine. In the past, TypeDB was enabled by various open-source technologies and communities that we are hugely thankful to: Apache Cassandra, Apache Hadoop, Apache Spark, Apache TinkerPop, and JanusGraph. Thank you!

Licensing

This software is developed by Vaticle. It's released under the GNU Affero GENERAL PUBLIC LICENSE, Version 3, 29 June 2007. For license information, please see LICENSE.

Copyright (C) 2020 Vaticle