sto usando wso2dss 3.0.0.I'm tentativo di eseguire un esempio di query PostgreSQLERRORE: L'indice di colonna è fuori portata: 1, numero di colonne: 0
SELECT addressid, geocode
FROM maddress
WHERE geocode::point <@ circle '((18.9750,72.8258), 5)';
Si sta lavorando bene in PostgreSQL.When sto usando stessa query in wso2dss cioè
SELECT addressid, geocode
FROM maddress
WHERE geocode::point <@ circle '((?,?), ?)';
per me motivo di errore del tipo:
DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: Geofence_DataService
Location: /Geofence_DataService.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: adding_geofence_op
Current Params: {longitude=72.8258, radius=4, latitude=18.9750}
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns: 0.
se rimuovo 01.239.549,745 mila(virgolette) di cerchio quindi non verrà eseguito. query '' simile a questa: (??? (,),)
SELEZIONA AddressId, geocoding DA maddress DOVE geocode :: punto < @ circolo;
ti do seguente errore:
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: Geofence_DataService
Location: /Geofence_DataService.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: geofence_op
Current Params: {longitude=72.8258, radius=4, latitude=18.9750}
Nested Exception:-
org.postgresql.util.PSQLException: ERROR: function circle(record, double precision) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type cast
Ma cerchio è insito funzione geografica di PostgreSQL, allora è necessario scrivere funzione esplicita? altrimenti dov'è l'errore esatto? Anche se inserisco la query con il parametro di input mentre eseguo in PostgreSQL, funziona anche. Se è così, perché non accetta i parametri dinamici? Per favore fatemi sapere ..
non so wso2dss ma il problema sembra essere come i parametri si innestano nella stringa che definisce il cerchio . La seconda opzione senza le virgolette è semplicemente sbagliata perché ora PostgreSQL tratta 'circle (...)' come una funzione per la quale non esiste uno schema adeguato. Scopri come i parametri vengono inseriti nella query da wso2dss. – Patrick
yup..e wso2dss non è in grado di accettare il funation..questo è il problema – user3129056