Class GeoPkgFilterToSQL

    • Constructor Detail

      • GeoPkgFilterToSQL

        public GeoPkgFilterToSQL​(GeoPkgDialect dialect)
        Parameters:
        dialect -
      • GeoPkgFilterToSQL

        public GeoPkgFilterToSQL​(Writer out)
        Parameters:
        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.

        Overrides:
        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
        Overrides:
        encode in class FilterToSQL
        Parameters:
        filter - the Filter to be encoded.
        Throws:
        FilterToSQLException - If filter type not supported, or if there were io problems.