Query any Oracle database with XQuery through the Stylus XQuery XQJ API. Only the JDBC URL changes across vendors — the XQJ code below is identical for every supported database.
jdbc:xquery:oracle://host:1521;ServiceName=your_service
import javax.xml.xquery.*;
import java.util.Properties;
import com.ddtek.xquery.xqj.DDXQDataSource;
public class OracleExample {
public static void main(String[] args) throws XQException {
DDXQDataSource ds = new DDXQDataSource();
ds.setProperty(DDXQDataSource.JDBCURL,
"jdbc:xquery:oracle://server1:1521;ServiceName=ORCL;User=scott;Password=tiger");
XQConnection cn = ds.getConnection();
XQPreparedExpression q = cn.prepareExpression(
"for $c in fn:collection('customers')/* return <name>{$c/CompanyName/text()}</name>");
System.out.println(q.executeQuery().getSequenceAsString(new Properties()));
cn.close();
}
}
| Test family | Status |
|---|---|
| SQL data-type coverage (NUMBER, VARCHAR2, DATE, TIMESTAMP, CLOB, XMLTYPE, …) | ✔ |
| Relational use cases — query & join pushdown | ✔ |
| XQuery Functions & Operators library | ✔ |
| XQuery Update Facility (XUF) | ✔ |
| Modules & prolog | ✔ |
| Namespaces | ✔ |
| Internationalization & encodings | ✔ |
| Regression & customer defects | ✔ |