queryString method
Implementation
String queryString(Query query) {
final buffer = StringBuffer('SELECT * FROM $tableName\n');
for (final join in childJoins) {
buffer.writeln(join.toSql());
}
if (query.whereClauses.isNotEmpty) {
buffer.writeln();
buffer.writeln("WHERE");
buffer.writeln(query.whereStringWithValues());
}
if (query.orderByClauses.isNotEmpty) {
buffer.writeln();
buffer.writeln("ORDER BY");
buffer.writeln(query.orderByString());
}
// if (hasReferences) {
// buffer.writeln();
// buffer.writeln(buildInnerJoins(this));
// }
return buffer.toString().trim();
}