private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_AsText({0})", String.class, field); case "SQLSERVER": return DSL.field("{0}.STAsText(0)", String.class, field); default: throw new UnsupportedOperationException("Dialect not supported"); } }
public static void registerDataTypes(DSLContext dsl) { SQLDialect dialect = dsl.dialect(); switch (dialect.family().toString()) { case "MYSQL": case "POSTGRES": case "SQLSERVER": DefaultDataType.getDefaultDataType(SQLDialect.DEFAULT, "geometry"); break; } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Within({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STWithin({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Equals({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STEquals({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_IsSimple({0})", Boolean.class, field); case "SQLSERVER": return DSL.field("{0}.STIsSimple()", Boolean.class, field); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Disjoint({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STDisjoint({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Touches({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STTouches({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_GeomFromText({0})", byte[].class, field); case "SQLSERVER": return DSL.field("{0}.STGeomFromText(0)", byte[].class, field); default: throw new UnsupportedOperationException("Dialect not supported"); } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_IsClosed({0})", Boolean.class, field); case "SQLSERVER": return DSL.field("{0}.STIsClosed()", Boolean.class, field); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Intersects({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STIntersects({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_IsValid({0})", Boolean.class, field); case "SQLSERVER": return DSL.field("{0}.STIsValid()", Boolean.class, field); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Overlaps({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STOverlaps({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Crosses({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STCrosses({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }
private QueryPart delegate(Configuration configuration) { switch (configuration.dialect().family().toString()) { case "MYSQL": case "POSTGRES": return DSL.field("ST_Contains({0}, {1})", Boolean.class, field1, field2); case "SQLSERVER": return DSL.field("{0}.STContains({1})", Boolean.class, field1, field2); default: throw new UnsupportedOperationException("Dialect not supported"); } } }