Support and Documentation

Viewing generated SQL

To view the corresponding SQL select statement (for debugging purposes) from a Dari query:

Query yourQuery = Query.from(Article.class).where("headline = ?", "Foo");
return Database.Static.getFirst(MySQLDatabase.class).buildSelectStatement(yourQuery);

The above code would display an SQL statement similar to the following:

SELECT 'r'.'id', 'r'.'typeId', 'r'.'data' FROM 'Record' AS 'r'
  JOIN 'RecordString4' AS 'i0'
  ON ('i0'.'id' = 'r'.'id' 
    AND 'i0'.'typeId' = 'r'.'typeId' 
    AND 'i0'.'symbolId' IN (51))
  WHERE ('r'.'typeId' IN (X'4f8e492c6f2f390ebc61f176d3a37ab9')
    AND 'i0'.'value' IS NOT NULL
    AND 'i0'.'symbolId' = 51
    AND 'i0'.'value' IN (X'666f6f'))
  LIMIT 2147483647;