|
|
@@ -15,6 +15,7 @@
|
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
|
|
|
|
+import cStringIO
|
|
|
import logging
|
|
|
import re
|
|
|
|
|
|
@@ -302,8 +303,10 @@ class HS2Api(Api):
|
|
|
|
|
|
def _get_statements(self, hql_query):
|
|
|
hql_query = strip_trailing_semicolon(hql_query)
|
|
|
+ hql_query_sio = cStringIO.StringIO(hql_query)
|
|
|
+
|
|
|
statements = []
|
|
|
- for (start_row, start_col), (end_row, end_col), statement in split_statements(hql_query):
|
|
|
+ for (start_row, start_col), (end_row, end_col), statement in split_statements(hql_query_sio.read()):
|
|
|
statements.append({
|
|
|
'start': {
|
|
|
'row': start_row,
|