View Javadoc

1   package liquibase.ext.spatial.sqlgenerator;
2   
3   import liquibase.database.Database;
4   import liquibase.database.core.MySQLDatabase;
5   import liquibase.statement.core.UpdateStatement;
6   
7   /**
8    * The <code>SpatialUpdateGeneratorMySQL</code> generates the SQL for <code>UPDATE</code>ing
9    * geometries in MySQL.
10   */
11  public class SpatialUpdateGeneratorMySQL extends AbstractSpatialUpdateGenerator {
12     @Override
13     public boolean supports(final UpdateStatement statement, final Database database) {
14        return database instanceof MySQLDatabase;
15     }
16  
17     /**
18      * Returns the name of the function that converts Well-Known Text to a database-specific
19      * geometry.
20      * 
21      * @return the name of the function that converts WKT to a geometry.
22      */
23     @Override
24     public String getGeomFromWktFunction() {
25        return "GeomFromText";
26     }
27  }