1 package liquibase.ext.spatial.sqlgenerator; 2 3 import liquibase.database.Database; 4 5 public interface WktInsertOrUpdateGenerator { 6 7 /** 8 * Converts the given Well-Known Text and SRID to the appropriate function call for the database. 9 * 10 * @param wkt 11 * the Well-Known Text string. 12 * @param srid 13 * the SRID string which may be an empty string. 14 * @param database 15 * the database instance. 16 * @return the string that converts the WKT to a database-specific geometry. 17 */ 18 String convertToFunction(String wkt, String sridString, Database database); 19 20 /** 21 * Returns the name of the function that converts Well-Known Text to a database-specific 22 * geometry. 23 * 24 * @return the name of the function that converts WKT to a geometry. 25 */ 26 String getGeomFromWktFunction(); 27 28 /** 29 * Indicates if the SRID parameter is required in the function returned from 30 * {@link #getGeomFromWktFunction()}. 31 * 32 * @param database 33 * the database instance. 34 * 35 * @return <code>true</code> if the SRID parameter is required in order to invoke the function. 36 */ 37 boolean isSridRequiredInFunction(Database database); 38 }