1 package liquibase.ext.spatial.sqlgenerator;
2
3 import liquibase.database.Database;
4 import liquibase.database.core.DerbyDatabase;
5 import liquibase.database.core.H2Database;
6 import liquibase.statement.core.UpdateStatement;
7
8
9
10
11
12 public class SpatialUpdateGeneratorGeoDB extends AbstractSpatialUpdateGenerator {
13 @Override
14 public boolean supports(final UpdateStatement statement, final Database database) {
15 return database instanceof DerbyDatabase || database instanceof H2Database;
16 }
17
18
19
20
21
22
23
24 @Override
25 public String getGeomFromWktFunction() {
26 return "ST_GeomFromText";
27 }
28
29
30
31
32
33
34 @Override
35 public boolean isSridRequiredInFunction(final Database database) {
36 return true;
37 }
38 }