Opened 11 years ago

Closed 11 years ago

#408 closed defect (fixed)

Parsing of query parameters in RASQL statement

Reported by: Dirk Daems Owned by: Dimitar Misev
Priority: major Milestone: 8.4.4
Component: java Version: 8.4
Keywords: Cc: Peter Baumann
Complexity: Medium

Description

Parsing of parameters is different when using the RASJ API compared to the command-line RASQL utility. When using the RASJ API, I have to add a space character before and after the parameter that needs to be substituted:

insert into my_collection values inv_tiff( $1 )

If I omit these whitespace characters, I get an error:

“0 variable(s) in the query string vs. 1 parameter(s) bound to the query”.

In the RasOQLQuery class, a StringTokenizer (default delimiter is whitespace) is used to locate the parameters. As such, the parameter is not found when omitting the whitespace.

Change History (3)

comment:1 by Dimitar Misev, 11 years ago

Cc: Peter Baumann added
Milestone: 8.4.4
Status: newaccepted

Test code is attached in ticket #409

comment:2 by Dimitar Misev, 11 years ago

patch submitted

comment:3 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.