Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow queries to be printed #19

Open
GoogleCodeExporter opened this issue Jun 15, 2015 · 2 comments
Open

Allow queries to be printed #19

GoogleCodeExporter opened this issue Jun 15, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

From forum: https://groups.google.com/forum/#!topic/cqengine-discuss/xhpeTIH0uh0

It should be possible to print queries for debugging purposes.

toString should be implemented consistently across all Query objects.

Original issue reported on code.google.com by ni...@npgall.com on 27 Aug 2013 at 11:03

@GoogleCodeExporter
Copy link
Author

Fixed in trunk.

The code:

    Query<Car> query = and(
        equal(Car.MANUFACTURER, "Toyota"),
        equal(Car.COLOR, Car.Color.BLUE),
        equal(Car.DOORS, 3)
    );

    System.out.println(query);

Now prints:

    and(equal(Car.manufacturer, Toyota), equal(Car.color, BLUE), equal(Car.doors, 3))

The toString representation of queries, now resembles the representation of 
those queries in code (i.e. as constructed using QueryFactory). There is still 
some work to be done for toString representation of JOINs.

I'll leave this ticket open until this fix has been released to Maven central.

Original comment by ni...@npgall.com on 27 Aug 2013 at 11:20

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Implemented the remaining changes to support toString for JOINs.

Released in CQEngine 1.2.1.

Original comment by ni...@npgall.com on 10 Sep 2013 at 9:26

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant