jaguar_orm icon indicating copy to clipboard operation
jaguar_orm copied to clipboard

Print SQL from Find statement

Open jamespet77 opened this issue 4 years ago • 1 comments

Is it possible to print the generated SQL from a Find statement? I am trying to recreate some rather complicated queries and would like to know if it is correct?

jamespet77 avatar Jun 05 '20 12:06 jamespet77

Something like this should be able to do it, you'll just have to choose the correct composer for your database, in this case SQFlite.

import 'package:jaguar_query/jaguar_query.dart';
import 'package:jaguar_query_sqflite/composer.dart';

class SQFlite {
  static void print(Find query) => print(composeFind(query));
}

JamesMcIntosh avatar Jul 26 '20 07:07 JamesMcIntosh