Skip to content

Print SQL from Find statement #190

Open
@jamespet77

Description

@jamespet77

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?

Activity

JamesMcIntosh

JamesMcIntosh commented on Jul 26, 2020

@JamesMcIntosh

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));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jamespet77@JamesMcIntosh

        Issue actions

          Print SQL from Find statement · Issue #190 · Jaguar-dart/jaguar_orm