Package gavo :: Package adql :: Module morphpg
[frames] | no frames]

Module morphpg

source code

Morphing ADQL into queries that postgres/pgSphere can understand.

Basically, Postgres support most of the stuff out of the box, and it's just a matter of syntax.

We morph most of the geometry stuff to pgsphere; while some of it would work with plain postgres in a plane approximation, it's certainly not worth the effort.

There's also code to replace certain CONTAINS calls with q3c function calls.

Classes
  PostgresMorphError
  PgSphereCode
A node that contains serialized pgsphere expressions plus a coordinate system id for cases in which we must conform.
Functions
 
morphMiscFunctions(tree)
replaces ADQL functions with (almost) equivalent expressions from postgres or postgastro.
source code
Variables
  __package__ = 'gavo.adql'
Function Details

morphMiscFunctions(tree)

source code 

replaces ADQL functions with (almost) equivalent expressions from postgres or postgastro.

This is a function mostly for unit tests, morphPG does these transformations.