-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEOMESA-3405 Postgis - support query interceptors (#3219)
- Loading branch information
1 parent
ff83fb0
commit fe52183
Showing
6 changed files
with
95 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...g/src/test/scala/org/locationtech/geomesa/gt/partition/postgis/TestQueryInterceptor.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*********************************************************************** | ||
* Copyright (c) 2013-2024 Commonwealth Computer Research, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Apache License, Version 2.0 | ||
* which accompanies this distribution and is available at | ||
* http://www.opensource.org/licenses/apache2.0.php. | ||
***********************************************************************/ | ||
|
||
package org.locationtech.geomesa.gt.partition.postgis | ||
|
||
import org.geotools.api.data.{DataStore, Query} | ||
import org.geotools.api.feature.simple.SimpleFeatureType | ||
import org.geotools.api.filter.Filter | ||
import org.locationtech.geomesa.index.planning.QueryInterceptor | ||
|
||
class TestQueryInterceptor extends QueryInterceptor { | ||
|
||
var sft: SimpleFeatureType = _ | ||
|
||
override def init(ds: DataStore, sft: SimpleFeatureType): Unit = this.sft = sft | ||
|
||
override def rewrite(query: Query): Unit = query.setFilter(Filter.INCLUDE) | ||
|
||
override def close(): Unit = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters