From a80a9a72533ccfea02e88b65d5bcbe31344d4579 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Wed, 4 Mar 2015 21:15:17 +0100 Subject: [PATCH] cql3: Add restriction::to_string() --- cql3/restrictions/restriction.hh | 2 ++ cql3/restrictions/single_column_restriction.hh | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cql3/restrictions/restriction.hh b/cql3/restrictions/restriction.hh index c35dddd5d8..fbc3fc2d3b 100644 --- a/cql3/restrictions/restriction.hh +++ b/cql3/restrictions/restriction.hh @@ -105,6 +105,8 @@ public: QueryOptions options) throws InvalidRequestException; #endif + + virtual sstring to_string() = 0; }; } diff --git a/cql3/restrictions/single_column_restriction.hh b/cql3/restrictions/single_column_restriction.hh index 7cb2fbe6ab..5268a8516b 100644 --- a/cql3/restrictions/single_column_restriction.hh +++ b/cql3/restrictions/single_column_restriction.hh @@ -485,12 +485,11 @@ public: return v; } + virtual sstring to_string() override { + return sprint("EQ(%s)", _value->to_string()); + } + #if 0 - @Override - public String toString() - { - return String.format("EQ(%s)", value); - } @Override public Restriction mergeWith(Restriction otherRestriction) throws InvalidRequestException