public String toSql ( boolean showParameters ) { String sql ; if ( forPaginator ) { sql = metaModel . getDialect ( ) . formSelect ( null , null , fullQuery , orderBys , limit , offset ) ; } else { sql = fullQuery != null ? fullQuery : metaModel . getDialect ( ) . formSelect ( metaModel . getTableName ( ) , null , subQuery , orderBys , limit , offset ) ; } if ( showParameters ) { StringBuilder sb = new StringBuilder ( sql ) . append ( ", with parameters: " ) ; join ( sb , params , ", " ) ; sql = sb . toString ( ) ; } return sql ; }
Use to see what SQL will be sent to the database .