Java (prql-java)

prql-java offers Rust bindings to the prql-compiler Rust library. It exposes a Java native method public static native String toSql(String query).

Installation

  1. <dependency>
  2. <groupId>org.prqllang</groupId>
  3. <artifactId>prql-java</artifactId>
  4. <version>${PRQL_VERSION}</version>
  5. </dependency>

Usage

  1. import org.prqllang.prql4j.PrqlCompiler;
  2. class Main {
  3. public static void main(String[] args) {
  4. String sql = PrqlCompiler.toSql("from table");
  5. System.out.println(sql);
  6. }
  7. }