Class GeoPkgFilterToSQL

    • Constructor Detail

      • GeoPkgFilterToSQL

        public GeoPkgFilterToSQL​(GeoPkgDialect dialect)
        dialect -
      • GeoPkgFilterToSQL

        public GeoPkgFilterToSQL​(Writer out)
        out -
    • Method Detail

      • escapeName

        public String escapeName​(String name)
        cf. visit(Literal expression,...) When doing temporal queries (like "time BETWEEN t1 AND t2")

        The encoding of the column name ("time") and the literals must be the same!

        There is different handling for Date (DATE) and Timestamp (DATETIME).

        For Timestamp (DATETIME), we use the datetime(XYZ, 'utc'):

        datetime("Time",'utc') BETWEEN datetime(?,'utc') AND datetime(?,'utc')

        For Date (DATE), we do no conversion in the sql lite:

        datetime("Date") BETWEEN datetime(?) AND datetime(?)

        For non-time columns, this just relegates to the superclass

        For GeoPKG, the time column is actually stored as a STRING.

        escapeName in class FilterToSQL
      • encode

        public void encode​(Filter filter)
                    throws FilterToSQLException
        Override done to ensure we don't complain if there is a BBOX filter, even if we claim not to support it
        encode in class FilterToSQL
        filter - the Filter to be encoded.
        FilterToSQLException - If filter type not supported, or if there were io problems.
      • visit

        public Object visit​(Literal expression,
                            Object context)
                     throws RuntimeException
        Description copied from class: FilterToSQL
        Export the contents of a Literal Expresion
        Specified by:
        visit in interface ExpressionVisitor
        visit in class PreparedFilterToSQL
        expression - the Literal to export
        RuntimeException - for io exception with writer