ADQL Docstrings

class ADQL.adql.ADQL(dbms='oracle', mode=0, level=7, encoding=None, debugfile=None, racol='ra', deccol='dec', xcol='x', ycol='y', zcol='z', indxcol=None)

ADQL class

ADQL is a variant of SQL that is understood by no DBMSs, the main difference from generic SQL being support for sky spatial constraints.

One approach to supporting ADQL is to extend the DBMS with these ADQL-specific constructs. The alternate approach taken here is to translate the ADQL into local SQL before sending it to the DBMS.

Since we also want to make use of spatial indexing to speed up spatial searches, we include in this translation additional spatial index column constraints. This requires reference to special added columns.

The hope is that this code can be leveraged by others who either wish to add spatial indexing to their DBMS the same way we have or would like a starting place for developing code around their own DBMS.

This package is complementary to but independent from our implemetation of the IVOA Table Access Protocol (TAP); a web service for managing remote database requests for astronomy in a general way. TAP manages requests/results and is generally fed ADQL. This ADQL translator is used by our TAP implementation to turn ADQL into SQL the local DBMS can handle directly.

sql(adql)

sql() converts an ADQL statement into SQL appropriate to an Oracle database with HTM or HPX spatial index columns.

Parameters

adql (string, required) – ADQL string, including geometric constraints.

Returns

Return type

SQL string for Oracle, including pure-SQL spatial constraints.